SBUF (Serial Data Buffer) is the register used to hold the data being transmitted or received over the serial port. When data is received, it is stored in the SBUF register, and the microcontroller generates an interrupt to notify the software that data is available. When data is transmitted, it is first written to the SBUF register, and then the microcontroller transmits the data over the serial port.
Together, SCON and SBUF provide the necessary hardware support for serial communication in a microcontroller. The SCON register is used to configure the serial port for the desired communication parameters, while the SBUF register is used to hold the data being transmitted or received. The software running on the microcontroller can read from or write to these registers as needed to implement serial communication protocols.
In summary, SCON and SBUF are two important registers used for serial communication in a microcontroller. SCON is used to configure the serial port, while SBUF is used to hold the data being transmitted or received. By manipulating these registers, the microcontroller can communicate with other devices using a serial protocol such as RS-232 or UART.