[51] how to interface HC-05 bluetooth through mcu8051?

Status
Not open for further replies.
This is what I did, I use AT89S51 MCU with itead BT_Module, connect the BT_Module's RX to MCU's TXD and BT_Module's TX to MCU's RXD, also VCC(+5V) and GND of course.

The baud rate of HC-05 in this itead BT_Module for both communicate to PC and send/receive (TX/RX) are default at 38400, therefore, in order to make change to it (unless you want to use it's default setting without change), the communication protocol must match with it's 38400 baud rate. In my case, I use 19200 for my project's communication baud rate, so I have to change it's setting with "AT+UART" command to define my own baud rate setting which I use Arduino Uno as the interface to implement it. Then, my PC runs the AP I created by my self with baud rate 19200 to send out the command, and the MCU runs the code wrote by my self with 19200 baud rate setting to receive in the command from PC through the BT_Module as an simulated serial port. Here is the waveform I measured from MCU's RXD pin 10 with zoom-in view at bottom portion in yellow line:

The pink line is the PWM waveform of output port from MCU P2.0 which is for servo control, the pulse width can then modulate by PC's command in order to rotate servo to different angle.
 
Reactions: th3gr8

    th3gr8

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…