CHAPTER 10 SERIAL INTERFACE FUNCTION
User’s Manual U14492EJ3V0UD
436
(6) Parity types and corresponding operation
A parity bit is used to detect a bit error in communication data. Normally, the same type of parity bit is used at
the transmission and reception sides.
(a) Even parity
(i)
During transmission
The parity bit is controlled so that the number of bits with the value “1” within the transmit data
including the parity bit is even. The parity bit value is as follows.
•
If the number of bits with the value “1” within the transmit data is odd: 1
•
If the number of bits with the value “1” within the transmit data is even: 0
(ii) During reception
The number of bits with the value “1” within the receive data including the parity bit is counted, and a
parity error is generated if this number is odd.
(b) Odd parity
(i)
During transmission
In contrast to even parity, the parity bit is controlled so that the number of bits with the value “1”
within the transmit data including the parity bit is odd. The parity bit value is as follows.
•
If the number of bits with the value “1” within the transmit data is odd: 0
•
If the number of bits with the value “1” within the transmit data is even: 1
(ii) During reception
The number of bits with the value “1” within the receive data including the parity bit is counted, and a
parity error is generated if this number is even.
(c) 0 parity
During transmission the parity bit is set to “0” regardless of the transmit data.
During reception, no parity bit check is performed. Therefore, no parity error is generated regardless of
whether the parity bit is “0” or “1”.
(d) No parity
No parity bit is added to the transmit data.
During reception, the receive operation is performed as if there were no parity bit. Since there is no
parity bit, no parity error is generated.