
359
13.7 Operation of UART
r Transfer Data Format
Transfer data always starts with the start bit ("L" level) and ends with the stop bit ("H" level).
The data of the specified data bit length is transferred in "LSB first."
In operation mode 1, the data is fixed to eight bits with an address/data setting bit (A/D) bit
instead of a parity bit.
Figure 13.7-2 Transfer Data Format (Operation Modes 0 and 1)
r Transmission Operation
When the transmission data empty flag bit (TDRE) of the status register (SSR0/SSR1) is set to
"1", send data is written to the output data register (SODR0/SODR1). If the transmission is
enabled (SCR0/SCR1: TXE="1"), data is sent.
When the send data is transferred to the transmission shift register and transmission is started,
the transmission data empty flag bit (TDRE) of the status register (SSR0/SSR1) is set to "1"
again so that the next piece of send data can be set. If the transmission interrupt request output
is enabled (SSR0/SSR1: TIE="1"), a transmission interrupt request is output so that send data is
set to the output data register (SODR0/SODR1). The transmission data empty flag bit (TDRE)
is cleared to "0" after writing the send data to the output data register (SODR0/SODR1).
r Reception Operation
If the reception is enabled (SCR0/SCR1: RXE="1"), reception operation is always performed.
When a start bit is detected, one frame of data is received in accordance with the data format
specified in the control register (SCR0/SCR1). When reception of one frame is completed, if a
reception error occurs, one of the reception error flag bits (PE, ORE, FRE) of the status register
(SSR0/SSR1) is set to "1" and then the reception data full flag bit (RDRF) is set to "1". If the
reception interrupt request output is enabled (SSR0/SSR1: RIE="1"), a reception interrupt
request is output. Check each of the reception error flag bits (PE, ORE, FRE) of the status
register (SSR0/SSR1). If no error occurred in reception, read the input data register (SIDR0/
SIDR1). If an error has occurred, take the appropriate measures to deal with the error. The
reception data full flag bit (RDRF) is cleared to "0" after reading receive data from the input data
register (SIDR0/SIDR1).
r Stop Bit
One or two stop bits can be set for transmission. The receiving side always evaluates the first
one bit.
r Error Detection
In operation mode 0, parity, overrun, and framing errors can be detected.
In operation mode 1, overrun and framing errors can be detected, but parity errors cannot be
detected.
[Operation mode 0]
*
: D7(bit7)........When no parity bit is added
P(parity)........When a parity bit is added
ST : Start bit
SP : Stop bit
A/D : Address/data setting bit of operation mode 1 (multiprocessor mode)
D7/P
SP
*
ST
D0
D1
D2
D3
D5
D4
D6
[Operation mode 1]
D7
A/D
SP
ST
D0
D1
D2
D3
D5
D4
D6