C8051F120/1/2/3/4/5/6/7 C8051F130/1/2/3
288
Rev. 1.4
21.1. UART0 Operational Modes
UART0 provides four operating modes (one synchronous and three asynchronous) selected by setting
configuration bits in the SCON0 register. These four modes offer different baud rates and communication
protocols. The four modes are summarized in Table 21.1.
21.1.1. Mode 0: Synchronous Mode
Mode 0 provides synchronous, half-duplex communication. Serial data is transmitted and received on the
RX0 pin. The TX0 pin provides the shift clock for both transmit and receive. The MCU must be the master
since it generates the shift clock for transmission in both directions (see the interconnect diagram in
Figure 21.3).
Data transmission begins when an instruction writes a data byte to the SBUF0 register. Eight data bits are
transferred LSB first (see the timing diagram in Figure 21.2), and the TI0 Transmit Interrupt Flag
(SCON0.1) is set at the end of the eighth bit time. Data reception begins when the REN0 Receive Enable
bit (SCON0.4) is set to logic 1 and the RI0 Receive Interrupt Flag (SCON0.0) is cleared. One cycle after
the eighth bit is shifted in, the RI0 flag is set and reception stops until software clears the RI0 bit. An inter-
rupt will occur if enabled when either TI0 or RI0 are set.
The Mode 0 baud rate is SYSCLK / 12. RX0 is forced to open-drain in Mode 0, and an external pullup will
typically be required.
Figure 21.2. UART0 Mode 0 Timing Diagram
Figure 21.3. UART0 Mode 0 Interconnect
Table 21.1. UART0 Modes
Mode
Synchronization
Baud Clock
Data Bits
Start/Stop Bits
0
Synchronous
SYSCLK / 12
8
None
1
Asynchronous
Timer 1, 2, 3, or 4 Overflow
8
1 Start, 1 Stop
2
Asynchronous
SYSCLK / 32 or SYSCLK / 64
9
1 Start, 1 Stop
3
Asynchronous
Timer 1, 2, 3, or 4 Overflow
9
1 Start, 1 Stop
D1
D0
D2
D3
D4
D5
D6
D7
RX (data out)
MODE 0 TRANSMIT
D0
MODE 0 RECEIVE
RX (data in)
D1
D2
D3
D4
D5
D6
D7
TX (clk out)
TX (clk out)
Shift
Reg.
CLK
C8051Fxxx
RX
TX
DATA
8 Extra Outputs
Summary of Contents for C8051F12 Series
Page 2: ...C8051F120 1 2 3 4 5 6 7 C8051F130 1 2 3 2 Rev 1 4 NOTES ...
Page 104: ...C8051F120 1 2 3 4 5 6 7 C8051F130 1 2 3 104 Rev 1 4 NOTES ...
Page 112: ...C8051F120 1 2 3 4 5 6 7 C8051F130 1 2 3 112 Rev 1 4 NOTES ...
Page 176: ...C8051F120 1 2 3 4 5 6 7 C8051F130 1 2 3 176 Rev 1 4 ...
Page 184: ...C8051F120 1 2 3 4 5 6 7 C8051F130 1 2 3 184 Rev 1 4 NOTES ...
Page 197: ...C8051F120 1 2 3 4 5 6 7 C8051F130 1 2 3 Rev 1 4 197 NOTES ...
Page 198: ...C8051F120 1 2 3 4 5 6 7 C8051F130 1 2 3 198 Rev 1 4 ...
Page 210: ...C8051F120 1 2 3 4 5 6 7 C8051F130 1 2 3 210 Rev 1 4 NOTES ...
Page 218: ...C8051F120 1 2 3 4 5 6 7 C8051F130 1 2 3 218 Rev 1 4 NOTES ...
Page 234: ...C8051F120 1 2 3 4 5 6 7 C8051F130 1 2 3 234 Rev 1 4 NOTES ...
Page 258: ...C8051F120 1 2 3 4 5 6 7 C8051F130 1 2 3 258 Rev 1 4 NOTES ...
Page 272: ...C8051F120 1 2 3 4 5 6 7 C8051F130 1 2 3 272 Rev 1 4 NOTES ...
Page 286: ...C8051F120 1 2 3 4 5 6 7 C8051F130 1 2 3 286 Rev 1 4 NOTES ...
Page 308: ...C8051F120 1 2 3 4 5 6 7 C8051F130 1 2 3 308 Rev 1 4 NOTES ...
Page 340: ...C8051F120 1 2 3 4 5 6 7 C8051F130 1 2 3 340 Rev 1 4 NOTES ...
Page 348: ...C8051F120 1 2 3 4 5 6 7 C8051F130 1 2 3 348 Rev 1 4 NOTES ...