Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[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.
BT_Module2MCUconn.JPGBT_ModulePinOut.JPGMCU_RXDTXD.JPGMCU_CloseUp.JPG
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:
MCUpin10RXDwaveform.JPG
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.
 
  • Like
Reactions: th3gr8

    th3gr8

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

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top