
284
CHAPTER 13 UART
13.1 Overview of UART
UART is a general-purpose communication interface for serial data. UART allows
variable-length serial data to be transferred synchronously or asynchronously with a
clock. The transfer format is NRZ. The dedicated baud rate generator, external clock,
or internal timer (8-bit PWM timer) settings determine the data transfer format.
s Functions of UART
UART supports (serial I/O) functions for sending serial data to, or receiving serial data from a
CPU or peripheral functions.
The full-duplex double-buffer enables bi-directional full-duplex communication.
Synchronous data transfer mode or asynchronous data transfer mode can be selected.
The internal baud rate generator allows one of 14 baud rates to be selected. Also, external
clock input and 8-bit PWM timer output allow user-defined baud rates to be specified.
The length of data is variable. When no parity is used, 7 bits to 9 bits are available. When
parity is used, 6 bits to 8 bits are available.
(Table 13.1-1 "UART Operating Modes")
The data transfer format is NRZ (Non Return to Zero).
Table 13.1-2 "Transfer Cycles and Transfer Rates Available for the Dedicated Baud Rate
Generator (when FCH = 10 MHz)" provides the transfer rates of the dedicated baud rate
generator, and
Table 13.1-3 "Transfer Cycles and Transfer Rates Selec for an External Clock"
provides the transfer rates of the external clock.
s Serial Switch
UART and 8-bit serial I/O use the same terminals, thus they cannot be simultaneously used.
The serial switch circuit needs be used to select either of them.
When UART is selected using the serial switch, P30/UCK/SCK is used as the UART serial clock
I/O terminal (UCK), P31/UO/SO is used as the UART data output terminal (UO), and P32/UI/SI
is used as the UART data input terminal (UI).
Table 13.1-1 UART Operating Modes
Operating mode
Data length
Synchronization mode
Stop bit length
Parity not used
Parity used
0
7
6
Synchronous/asynchronous
1 bit or 2 bits(*1)
1
8
7
Synchronous/asynchronous
1 bit or 2 bits(*1)
2
8+1
-
Synchronous/asynchronous
1 bit or 2 bits(*1)
3
9
8
Synchronous/asynchronous
1 bit or 2 bits(*1)
*1: Only one bit is allowed for the stop bit length when data is received. The second bit is ignored even if it
is received.