![]() The full set of commands is detailed in this datasheet. There is no need to modify these settings unless otherwise required. The Bluetooth module adheres to the "Serial Port Profile" (SPP), which means it can communicate to a connected device just like any other normal serial port. The module can be easily connected to the PIC via its 2 RX/TX pins on the hardware UART. ![]() HC-06įor general information on the HC-06 device and available commands, please see my previous Arduino post. Most of the C code will be using MPLAB Code Configurator to easily setup everything. A timer is configured to create a 500ms event that toggles an LED to show program execution. Any character received through the interrupt driven RX buffer is immediately echoed back to the bluetooth device. The PIC will continuously increment a 32-bit variable and print it to the bluetooth radio via its hardware UART configured at 9600 baud. The code and application can be adapted for others, namely the pin mappings. You don't necessarily have to use this exact microcontroller. I will be using a PIC16F1829 in a PDIP package, which comes with the PICkit 3 Low Pin Count Demo Board or the PICkit 3 Starter Kit. This tutorial will cover setting up the HC-06 bluetooth device with a PIC microcontroller for Bi-directional data between the PIC and an Android phone.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |