interfacing bluetooth with 8051 microcontroller
interfacing bluetooth with 8051 microcontroller THIS A VERY GOOD 8051 PROJECT CODE WRITTEN IN C LANGUAGE
CODE
void main(void)
{
RS=0;
EN=0;
delay_LCD(100);
TMOD=0x20;//serial data
TH1=0xFD;
SCON=0X50;
TR1=1;
tx(‘H’);
tx(‘I’);
tx(‘\r’);
tx(‘\n’);
LCDCMD(0x02); //
LCDCMD(0x28); //
LCDCMD(0x0C); //
LCDCMD(0x01); //
delay_LCD(100);
LCDCMD(0x80); //
LCDDATA(‘A’);
P1=0xff; // initialize p1
delay_LCD(500); //500ms time delay
LCDCMD(0x80); //display on. cursor off
delay_LCD(50); //500ms time delay
LCD_Cursor (2,5);
/*
LCDDATA(‘A’);
LCDDATA(‘L’);
LCDDATA(‘L’);
LCDDATA(‘A’);
LCDDATA(‘H’);
*/
LCD_CHR(1,3,’A’);
// delay_LCD(2000); //500ms time delay
LCD_OUT(1,1,”WELL COME”);
delay_LCD(2000); //500ms time delay
LCD_OUT(1,1,” “);
LCDCMD(0x80); //
while(1){
rxx();
// LCD_CHR(1,3,data1);
LCDDATA(data1);
}
}