This blog post summarize how to interface Bluetooth with 8051 using assembly programming
PS-TRAINER-8051 trainer kit is proposed to smooth the progress of learning and developing designs of MCU from Intel and NXP. It has the facility to connect PC’s 101/104 Keyboard, to enter user programs in Assembly languages. Serial communication achieved using 8051. It also supports C & assembly language in standalone kit (P89V51RD2). It’s designed as to facilitate On-board Programmer for NXP 8051 MCU through ISP on serial port.
Bluetooth is a proprietary open wireless technology standard for exchanging data over short distances from fixed and mobile devices, creating personal area networks (PANs) with high levels of security. Bluetooth technology allows electronic devices to communicate wirelessly.
Interfacing Bluetooth with 8051
Fig. 1 shows how to interface the Bluetooth with microcontroller. Bluetooth technology handles the wireless part of the communication channel; it transmits and receives data wirelessly between these devices. It delivers the received data and receives the data to be transmitted to and from a host system through a host controller interface (HCI). The most popular host controller interface today is either a UART or a USB. Here, I will only focus on the UART interface; it can be easily show how a Bluetooth module can be integrated on to a host system through a UART connection.
Interface Bluetooth with 8051
We now want to transmit & receive the data from host system to PS-2 8051 Trainer by using Bluetooth module through UART0. The serial data is taken from or sent to the host system by using Bluetooth module through MAX232 into the SBUF register of 8051 microcontroller (refer serial interfacing with 89V51RD2). The serial data from the host device is taken by using the Serial Interrupt of the 8051 controller. The UART0 pin lines are used to transmit & receive operations in PS-2 8051 Trainer
Pin assignment with 8051
Circuit diagram to Interface Bluetooth with 8051
Assembly program to interface Bluetooth with 8051
|75 8D FD
|75 98 52
|30 99 FD