Maker Pro
Maker Pro

Interface microcontroller with bluetooth device(SPP)

mat1235

Apr 1, 2012
2
Joined
Apr 1, 2012
Messages
2
Hi guys,
I need some information about university project.

I'm making a project with microcontroller(HCS08 freescale) and i want to interface it with bluetooth device(PAN1321) that support serial port profile .
I know that must send AT commands to able SPP and so i've RS232 serial cable emulation, but i don't understand this very well; so i've two question:

1)Do i need to implement the code of a RS232 receiver in my micro for recive data, or simply,after connect the devices, i read the data on my UART?
2)The data packets received, are in rs232 format?

Thanks a lot in advance

ps:
I still do not have the devices, will arrive next week, but I want to give me an idea
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,722
Joined
Nov 17, 2011
Messages
13,722
I assume the HCS08 has an integrated UART. If so, you need to set up the UART for the correct communication parameters (baud rate, No of bits, Parity etc.) The manual of the HCS08 should give you the necessary information.

You may also need an RS232 level shifter. That depends on the interface of the bluetooth module. The HCS08 will operate on 5V or 3.3V, I don't know. RS232, however, uses +-12 V. Unless the bluetooth module uses the UART protocol but a logic level (5V or 3.3V) that is compatible with the HCS08. Again: read the manual.

What do you mean by RS232 format? RS232 describes the physical data format but not the way the transmitted information is to be interpreted. This has to be defined by the user. Normally the UART will transmit and receive single bytes (8 bit). The meaning of these bytes is entirely controlled by your application (such as e.g. sending AT commands as a series of appropriate bytes). What you have to send and how you have to interpret the received data from the bluetooth module should be described in the module's manual.

Harald
 
Last edited:

mat1235

Apr 1, 2012
2
Joined
Apr 1, 2012
Messages
2
Sorry, i've written format but i thought level (i'm not english, and probably i didn't clear ;) ).
You've been very clear and your assumptions are all correct, in part was as I thought.

If i will have some doubt i hope that you may help me about this topic.

Thank you very much
 
Top