13.3
Operation of UART
The UART has two operating modes: asynchronous (start-stop synchronization) mode
and clock synchronous mode.
Asynchronous mode consists of normal and multiprocessor mode.
This section describes the operation of these operating modes.
■ Operating Modes
The UART has the operating modes shown in Table 13.3-1 and can switch the mode by setting a value in
the SMR and SCR registers.
Table 13.3-1 UART Operating Modes
Mode
Parity
Yes/No
0
Yes/No
1
No
2
No
The stop bit length in asynchronous (start-stop synchronization) mode can be specified only for a send
operation. The stop bit length is always one bit for a receive operation. Since operation is possible only in
the above modes, do not make any other setting.
■ Selecting a Clock for the UART
●
Internal Timer
If you select the U-TIMER by setting CS0 to "0", the baud rate is determined according to the reload value
set for the U-TIMER. At this time, you can calculate the baud rate as follows:
Asynchronous (start-stop synchronization) φ/ (16 × β)
CLK synchronous
In asynchronous (start-stop synchronization) mode, data can be transferred in the range from -1% to +1%
of the specified baud rate.
●
External Clock
If you select an external clock by setting CS0 to "1", the baud rate is as follows (the frequency of the
external clock is assumed to be φ):
Asynchronous (start-stop synchronization) :φ/16
CLK synchronous
Data length
7
Asynchronous (start-stop synchronization): normal
mode
8
Asynchronous (start-stop synchronization):
8+1
multiprocessor mode
8
CLK synchronous mode
φ: Peripheral machine clock frequency
β: Cycle defined for the U-TIMER (2n+2 or 2n+3, n is the reload value [n≥3])
However, the maximum value for φ is 3.125 MHz.
Operating mode
φ/β
:φ
CHAPTER 13 UART
Stop bit length
1 bit or 2 bits
No
313