English
Language : 

C8051F850-C-GM Datasheet, PDF (303/328 Pages) Silicon Laboratories – Low-Cost 8-bit MCU Family with up to 8 kB of Flash
26. Universal Asynchronous Receiver/Transmitter (UART0)
UART0 is an asynchronous, full duplex serial port offering modes 1 and 3 of the standard 8051 UART.
Enhanced baud rate support allows a wide range of clock sources to generate standard baud rates (details
in Section “26.1. Enhanced Baud Rate Generation” on page 271). Received data buffering allows UART0
to start reception of a second incoming data byte before software has finished reading the previous data
byte.
UART0 has two associated SFRs: Serial Control Register 0 (SCON0) and Serial Data Buffer 0 (SBUF0).
The single SBUF0 location provides access to both transmit and receive registers. Writes to SBUF0
always access the transmit register. Reads of SBUF0 always access the buffered receive register;
it is not possible to read data from the transmit register.
With UART0 interrupts enabled, an interrupt is generated each time a transmit is completed (TI is set in
SCON0), or a data byte has been received (RI is set in SCON0). The UART0 interrupt flags are not cleared
by hardware when the CPU vectors to the interrupt service routine. They must be cleared manually by soft-
ware, allowing software to determine the cause of the UART0 interrupt (transmit complete or receive com-
plete).
UART0
TB8
TI, RI
(9th bit)
Interrupts
Output Shift
R e g is te r
TX
Control /
C o n fig u ra tio n
SBUF (8 LSBs)
Baud Rate
G e n e ra to r
(Timer 1)
TX Clk
RX Clk
RB8
(9th bit)
Input Shift
R e g is te r
RX
START
D e te c tio n
Figure 26.1. UART0 Block Diagram
26.1. Enhanced Baud Rate Generation
The UART0 baud rate is generated by Timer 1 in 8-bit auto-reload mode. The TX clock is generated by
TL1; the RX clock is generated by a copy of TL1 (shown as RX Timer in Figure 26.2), which is not user-
accessible. Both TX and RX Timer overflows are divided by two to generate the TX and RX baud rates.
The RX Timer runs when Timer 1 is enabled, and uses the same reload value (TH1). However, an
RX Timer reload is forced when a START condition is detected on the RX pin. This allows a receive to
begin any time a START is detected, independent of the TX Timer state.
Rev. 1.0
271