
CHAPTER 14 SERIAL INTERFACE UART2
User
’
s Manual U13655EJ2V1UD
213
(b) Parity types and operation
The parity bit is used to detect a bit error in the communication data. Normally, the same kind of parity bit
is used on the transmitting side and the receiving side. With even parity and odd parity, a
“
1
”
bit (odd
number) error can be detected. With 0 parity and no parity, an error cannot be detected.
Caution
When negative logic is selected for a transmit/receive signal, this bit must be set as “No
parity”.
(i)
Even parity
Transmission
The number of bits with a value of 1, including the parity bit, in the transmit data is controlled to be
even. The value of the parity bit is as follows:
Number of bits with a value of 1 in transmit data is odd:
Number of bits with a value of 1 in transmit data is even:
1
0
Reception
The number of bits with a value of "1", including the parity bit, in the receive data is counted. If it is
odd, a parity error occurs.
(ii) Odd parity
Transmission
Conversely to the situation with even parity, the number of bits with a value of 1, including the
parity bit, in the transmit data is controlled to be odd. The value of the parity bit is as follows:
Number of bits with a value of 1 in transmit data is odd:
Number of bits with a value of 1 in transmit data is even:
0
1
Reception
The number of bits with a value of 1, including the parity bit, in the receive data is counted. If it is
even, a parity error occurs.
(iii) 0 parity
When transmitting, the parity bit is set to 0 irrespective of the transmit data.
At reception, no parity bit check is performed. Therefore, no parity error occurs, irrespective of
whether the parity bit is set to 0 or 1.
(iv) No parity
No parity bit is added to the transmit data.
At reception, data is received assuming that there is no parity bit. Since there is no parity bit, no
parity error occurs.