![](http://datasheet.mmic.net.cn/330000/MB90F562_datasheet_16437954/MB90F562_412.png)
388
CHAPTER 13 UART
MB90560 series
13.7
13.7.1 Operation in Asynchronous Mode (Operation Modes 0 and 1)
Operation of UART
When UART is used in operation mode 0 (normal mode) or operation mode 1
(multiprocessor mode), the asynchronous transfer mode is selected.
I
Operation in Asynchronous Mode
G
Transfer data format
Transfer data begins with the start bit (level “L”) and ends with the stop bit (level “H”). The data
of the specified data bit length is transferred in LSB first mode.
In operation mode 0, the length of data with no parity is fixed to 7 bits, and that of data with
parity is fixed to 8 bits.
In operation mode 1, the length of data is fixed to 8 bits with an address/data (A/D) selection
bit added instead of parity.
Figure 13.7-1 shows the data format in asynchronous mode.
Figure 13.7-1 Transfer data format (operation modes 0 and 1)
G
Transmission Operation
Transmission data is written to the serial output data register (SODR0/1) when the transmission
data empty flag bit (SSR1: TDRE) is “1”. This data is transmitted if the transmission operation is
enabled (SCR0/1: TXE=1).
The TDRE flag is again set to “1” when the transmission data is transferred to the transmission
shift register and its transmission starts. Then, the next transmission data gets ready to be set.
At this point, a transmission interrupt request is generated that the next transmission data can be
set in the SODR0/1 register if that request is enabled (SSR0/1: TIE=1). The TDRE flag is cleared
to “0” when the transmission data is written to SODR0/1.
G
Reception Operation
Reception operation is performed every time it is enabled (SCR0/1: RXE=1). When a start bit is
detected, a frame of data is received according to the data format specified by the serial control
register (SCR0/1). After the frame has been received, the receive data full flag bit (SSR0/1:
RDRF) is set to “1”. However, the error flag is set if an error occurs. At this point, a reception
interrupt request is output if it is enabled (SSR1: TIE=1).
Check each flag of the serial status reister(SSR0/1). If the reception is normal, read the serial
input data register (SIDR0/1). If an error is found, proceed to error handling. The RDRF flag is
cleared to 0 every time receive data is read from SIDR0/1.
D7/P
SP
ST
D0
D1
D2
D3
D5
D4
D6
D7
A/D
SP
ST
D0
D1
D2
D3
D5
D4
D6
[Operation mode 0]
[Operation mode 1]
* : D7 (bit 7) when parity is not provided
P (parity) when parity is provided
ST : Start bit
SP : Stop bit
A/D : Address/data selection bit in operation mode 1 (multiprocessor mode)
*