CHAPTER 16 ASYNCHRONOUS SERIAL INTERFACE/3-WIRE SERIAL I/O
User’s Manual U12697EJ3V0UM
276
(b) Parity types and operations
Parity bits serve to detect bit errors in transmit data. Normally, the parity bit used on the transmit side and
the receive side are of the same type. In the case of even parity and odd parity, it is possible to detect “1”
bit (odd number) errors. In the case of 0 parity and no parity, errors cannot be detected.
(i)
Even parity
• During transmission
Makes the number of “1”s in transmit data that includes the parity bit even. The value of the parity
bit changes as follows.
If the number of “1” bits in transmit data is odd: 1
if the number of “1” bits in transmit data is even: 0
• During reception
The number of “1” bits in receive data that includes the parity bit is counted, and if it is odd, a parity
error occurs.
(ii) Odd parity
• During transmission
Odd parity is the reverse of even parity. It makes the number of “1”s in transmit data that includes
the parity bit even. The value of the parity bit changes as follows.
If the number of “1” bits in transmit data is odd: 1
if the number of “1” bits in transmit data is even: 0
• During reception
The number of “1” bits in receive data is counted, and if it is even, a parity error occurs.
(iii) 0 Parity
During transmission, makes the parity bit “0”, regardless of the transmit data.
Parity bit check is not performed during reception. Therefore, no parity error occurs, regardless of
whether the parity bit value is “0” or “1”.
(iv) No parity
No parity is appended to transmit data.
Transmit data is received assuming that it has no parity bit. No parity error can occur because there
is no parity bit.