C8051F120/1/2/3/4/5/6/7
Rev. 1.2
263
22.
UART0
UART0 is an enhanced serial port with frame error detection and address recognition hardware. UART0 may operate
in full-duplex asynchronous or half-duplex synchronous modes, and mutiproccessor communication is fully sup-
ported. Receive data is buffered in a holding register, allowing UART0 to start reception of a second incoming data
byte before software has finished reading the previous data byte. A Receive Overrun bit indicates when new received
data is latched into the receive buffer before the previously received byte has been read.
UART0 is accessed via its associated SFR’s, Serial Control (SCON0) and Serial Data Buffer (SBUF0). The single
SBUF0 location provides access to both transmit and receive registers. Reading SCON0 accesses the Receive register
and writing SCON0 accesses the Transmit register.
UART0 may be operated in polled or interrupt mode. UART0 has two sources of interrupts: a Transmit Interrupt flag,
TI0 (SCON0.1) set when transmission of a data byte is complete, and a Receive Interrupt flag, RI0 (SCON0.0) set
when reception of a data byte is complete. UART0 interrupt flags are not cleared by hardware when the CPU vectors
to the interrupt service routine; they must be cleared manually by software. This allows software to determine the
cause of the UART0 interrupt (transmit complete or receive complete).
Figure 22.1. UART0 Block Diagram
Tx Control
Tx Clock
Tx IRQ
Zero Detector
Send
Shift
SET
Q
D
CLR
Stop Bit
Gen.
TB80
Start
Data
Write to
SBUF0
Crossbar
TX0
Port I/O
Serial Port
(UART0) Interrupt
Rx Control
Start
Rx Clock
Load
SBUF
0x1FF
Shift
EN
Rx IRQ
UART0
Baud Rate Generation
Logic
SFR Bus
Input Shift Register
(9 bits)
Frame Error
Detection
SBUF0
Read
SBUF0
SFR Bus
SADDR0
SADEN0
Match Detect
RB80
Load
SBUF0
Crossbar
RX0
SBUF0
Address
Match
SCON0
S
M
2
0
T
B
8
0
R
B
8
0
T
I
0
R
I
0
S
M
1
0
S
M
0
0
R
E
N
0
SSTA0
T
X
C
O
L
0
S
0
T
C
L
K
1
S
0
T
C
L
K
1
S
0
R
C
L
K
1
S
0
R
C
L
K
1
R
X
O
V
0
F
E
0
S
M
O
D
0
TI0
RI0
Summary of Contents for C8051F120
Page 2: ...C8051F120 1 2 3 4 5 6 7 2 Rev 1 2 Notes ...
Page 8: ...C8051F120 1 2 3 4 5 6 7 8 Rev 1 2 26 2 Flash Programming Commands 318 26 3 Debug Support 321 ...
Page 16: ...C8051F120 1 2 3 4 5 6 7 16 Rev 1 2 Notes ...
Page 48: ...C8051F120 1 2 3 4 5 6 7 48 Rev 1 2 ...
Page 98: ...C8051F120 1 2 3 4 5 6 7 98 Rev 1 2 ...
Page 106: ...C8051F120 1 2 3 4 5 6 7 106 Rev 1 2 Notes ...
Page 183: ...C8051F120 1 2 3 4 5 6 7 Rev 1 2 183 Notes ...
Page 184: ...C8051F120 1 2 3 4 5 6 7 184 Rev 1 2 ...
Page 214: ...C8051F120 1 2 3 4 5 6 7 214 Rev 1 2 Notes ...