STC8A8K64D4 Series Manual
14 UART Communication
There are 4 full duplex asynchronous serial communication ports (UART in short) in STC8A8K64D4 series of
microcontrollers. Each UART consists of two data buffers, a shift register, a serial control register and a baud rate generator.
Each UART data buffer consists of two independent receive and transmit buffers, which can transmit and receive data
simultaneously.
There are 4 modes for UART1 of STC8A8K64D4 series of microcontrollers, the baud rates of two modes of them are
variable, and the baud rates of the other two modes are fixed. They can be chosen for different applications. There are only
two modes in UART2, UART3 and UART4, and their baud rates are variable. Different baud rates and different modes can
be set by software. It is flexible for the host to query the receiving or sending process, or use the interrupt method.
All the pins of UART1, UART2, UART3 and UART4 can be switched amoung multiple groups of ports using the
pin switching function, so that a serial port can be multiplexed into severial serial ports in a time-sharing manner.
14.1 UART function pin switch
S1_S[1:0]: UART1 function pin selection bit
S4_S: UART4 function pin selection bit
S3_S: UART3 function pin selection bit
S2_S: UART2 function pin selection bit
14.2 Registers Related to UARTs
UART1 data buffer register
UART2 data buffer registe
UART3 data buffer register
Serial port 4 control register
Serial port 4 data buffer register
UART1 slave address register
UART1 slave address enable
register