- This topic has 1 reply, 2 voices, and was last updated 10 years, 8 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
|
Microcontroller › 8051 › HC-05
Please help me
I am using HC-05 Bluetooth module in my project ,I want to send data like numbers and some words to an andriod mobile phone, but HC-05 doesn’t send anything ,the wiring and code are correct though ,HC-0C is paired and connected well to my android device , but the data are not transferred , have anyone encountered the same problem !? or anyone who have worked on HC-05 maybe he could tell me how to use it maybe I did something wrong.
This is a simple code to send a and E serially
<reg51.h>
msDelay (unsigned int);
void main(void){
TMOD=0x20;
TH1=-3;
SCON=0x50;
TR1=1;
while (1) {
SBUF=”a”;
while (TI==0);
TI=0;
msDelay(5000);
SBUF=”E”;
while (TI==0);
TI=0;
msDelay(5000);
}
}
msDelay(unsigned int itime)
{
unsigned int i,j;
for(i=0;i<=itime;i++)
for(j=0;j<=100;j++);
}
check for baud rate setting (in the code) with that of Bluetooth Module.