
362
CHAPTER 16
SERIAL INTERFACE UART0 (
PD178076, 178078, AND 178F098 ONLY)
User’s Manual U12790EJ2V0UD
(3) Basic operation
(a) Data format
Figure 16-7 shows the format of the transmit/receive data.
Figure 16-7. Format of Transmit/Receive Data of Asynchronous Serial Interface
One data frame consists of the following bits.
Start bit .............. 1 bit
Character bits .... 7 or 8 bits (LSB-first)
Parity bit ............. Even parity/odd parity/0 parity/no parity
Stop bit .............. 1 or 2 bits
The character bit length, parity, and stop bit length of one data frame are selected by asynchronous serial
interface mode register 0 (ASIM0).
If the character bit length is specified to be 7 bits, only the lower 7 bits (bits 0 to 6) are valid. The most
significant bit (bit 7) is ignored during transmission, and it is “0” during reception.
The serial transfer rate is set by baud rate generator control register 0 (BGRC0).
If a receive error occurs in the serial data, the error can be identified by reading the status of asynchronous
serial interface status register 0 (ASIS0).
(b) Type and operation of parity
A parity bit is used to detect a bit error in the communication data. Usually, the same type of parity bit
is used on both the transmitter and receiver sides. With even parity or odd parity, an error of 1 bit (or
odd-number error) can be detected. Errors cannot be detected when 0 parity or no parity is specified.
1 data frame
Start
bit
D0
D1
D2
D3
D4
D5
D6
D7
Parity
bit
Stop bit
Character bits