8051 microcontrollers come with a built-in Universal Asynchronous Receiver Transmitter (UART) port for serial data exchange.
The serial port is controlled by a Special Function Register (SFR) called Serial Control (SCON). Its bits are defined as follows:
Bit | Name | Purpose |
0 | RI (short for Receive Interrupt) | Set by UART when a byte is received completely |
1 | TI (short for Transmit Interrupt) | Set by UART when a byte is transmitted completely |
2 | RB8 (short for Receive Bit 8) | Stores the ninth bit of the received data in 9-bit mode. |
3 | TB8 (short for Transmit Bit 8) | Stores the ninth bit of data to be transmitted in 9-bit mode (see below) |
4 | REN (short for Receiver Enabled) | Enables (1) or disables (0) the receive operation |
5 | SM2 (Enable Multiprocessor) | Enables (1) or disables (0) multiprocessor communication... |