Interface Bluetooth With 8051

A wireless technology used to exchange data over short distance.

  • It uses short wave length UHF radio wave.
  • Operated at a frequencies between 2400 and 2483.5Mhz.
  • Use to create personal area network.
  • It is alternate to RS232 data cable.
  • Bluetooth is more useful to transfer data with two or more devices in low bandwidth situations.
  • Bluetooth is also used to transfer sound data which as application in Mobile Phones.

Paring System:

  • To Transfer data between two devices , it must synchronized by paring.
  • Paring done link key.
  • When both devices have same link key then it said to be paired.

Data Transfer:

  • Bluetooth Transfer data by dividing the transmiting data into packets.
  • Transmit each packet on one of 79 designated Bluetooth channels.

Hardware Required

  • Bluetooth Module.
  • 8051 MicroController.

Bluetooth Pinout

  • Vin= +5V.
  • Tx= Rx of Microcontroller.
  • Rx= Tx of Microcontroller.
  • Gnd= Ground.


Virtual Circuit


 #include  <REGX51.H>
 unsigned int i,j;
 unsigned int l=0;
 unsigned char input;
 void serial0() interrupt 4
 void main ( void )
 TMOD=0x20; // set timer1 mode 2
 TH1=0xFD;    // baud rate 9600
 IE=0x90;        //enable serial interrupt
 SCON=0x50;  // config scon to send & recive with mode1
 TR1=1;     // start timer
 else if(input==0)