Hi guys, i am currently doing a project to let microcontroller communicate. The microcontroller used must be PIC16F877A or PIC16887 only. I want to configure one of my HC05 as master and another one as slave. But i am stuck as there are no example in internet that config HC05 using microcontroller.
I have done a function in C code using MPLABX that define the role.
void BT_set_role(unsigned char mode)
{
BT_send_module("AT+ROLE=");
BT_send_char(mode + '0');
BT_send_module("\r\n");
}
in my main function i will put BT_set_role(1) to make the module master. But the problem now is that how can i make them paired automatically and send date? how to create the function with AT commands in it to make them paired when i power up the circuit? How do i know whether are they paired ? any function that can response to me is paired? i dont know how to write the function for send data receive data paired them? pls help
I have done a function in C code using MPLABX that define the role.
void BT_set_role(unsigned char mode)
{
BT_send_module("AT+ROLE=");
BT_send_char(mode + '0');
BT_send_module("\r\n");
}
in my main function i will put BT_set_role(1) to make the module master. But the problem now is that how can i make them paired automatically and send date? how to create the function with AT commands in it to make them paired when i power up the circuit? How do i know whether are they paired ? any function that can response to me is paired? i dont know how to write the function for send data receive data paired them? pls help