Connect with us

Interface microcontroller with bluetooth device(SPP)

Discussion in 'Microcontrollers, Programming and IoT' started by mat1235, Apr 1, 2012.

Scroll to continue with content
  1. mat1235


    Apr 1, 2012
    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

    I still do not have the devices, will arrive next week, but I want to give me an idea
  2. Harald Kapp

    Harald Kapp Moderator Moderator

    Nov 17, 2011
    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.

    Last edited: Apr 1, 2012
  3. mat1235


    Apr 1, 2012
    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
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day