Poly Notes Hub

For Polytechnic and Degree Engineering Notes

Join Our Community For Daily Updates

For Polytechnic and Degree Engineering Notes

For Polytechnic and Degree Engineering Notes

Join Our Community For Daily Updates

SBUF Register in 8051 Microcontroller - poly notes hub

SBUF Register in 8051 Microcontroller | New Topic

In this note, we are going to know about the SBUF Register in 8051 Microcontroller. Welcome to Poly Notes Hub, a leading destination for engineering notes for diploma and degree engineering notes.

Author Name: Arun Paul.

What is SBUF Register in 8051 Microcontroller?

The SBUF (Serial Buffer) register of the 8051 microcontroller is a special function register (SFR) at address 99H that allows for asynchronous serial communication via the microcontroller’s UART (Universal Asynchronous Receiver Transmitter). It functions as a dual-purpose register, transferring and receiving data via the serial port.

SBUF Register in 8051 Microcontroller | New Topic - Poly Notes Hub
Function of SBUF Register in 8051 in Asynchronous Data Transfer

A. Data Transmission

  • When the CPU wants to transfer a byte of data over the serial port, it writes it to the SBUF register.
  • The value is then automatically moved to the transmit shift register, which initiates the transmission bit by bit (asynchronous).
  • SBUF is only free for the next write once the transmission is completed, as indicated by the TI (Transmit Interrupt) signal.

B. Data Reception

  • When data is received by the serial port, it is stored in the receive shift register.
  • When a whole byte is received, it is automatically stored in the SBUF register.
  • The CPU is able to obtain the data from the SBUF.
  • The RI (Receive Interrupt) flag is set to notify that new data has arrived.

Structure of SBUF Register for Asynchronous Data Transfer (8051)

SBUF is a single register (address: 99H) in the memory map, however it behaves as two different registers internally:

See also  Silicon Controlled Rectifier (SCR)
Function of SBUF Register in 8051 Microcontroller - poly notes hub
  • SBUF (Write): Writing to SBUF sends the byte to the Transmit Shift Register, which sends the data out through the TXD pin (asynchronous serial transmission).
  • SBUF (Read): After receiving 8 bits through the RXD pin, the Receive Shift Register moves the byte into SBUF, which the CPU reads.
  • TXD (Pin P3.1): Transmit Data pin.
  • RXD (Pin P3.0): Receive Data pin.

SBUF Register Applications

Here are the applications of SBUF Register –

  • Used for transmitting and receiving data between the 8051 microcontroller and a computer via RS232 (via a converter such as MAX232).
  • It is used to transmit AT commands to GSM modules and receive replies (SMS, call status, etc.) via asynchronous serial transfer.
  • Receives location data strings from a GPS receiver via serial input (RXD), which the microcontroller then processes.
  • SBUF allows engineers to send debugging messages or variable values to a PC terminal for real-time monitoring while developing.
  • SBUF transmits logged data (e.g., temperature, humidity) to a computer or storage device via serial connection.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top

Our Notes Categories