English
Language : 

UPD784938 Datasheet, PDF (436/733 Pages) NEC – 16-Bit Single-Chip Microcontrollers
CHAPTER 18 ASYNCHRONOUS SERIAL INTERFACE/3-WIRE SERIAL I/O
18.2.4 Parity types and operations
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 transmission side and the reception side. With even parity and odd parity, 1 bit (odd number) errors can be detected.
With 0 parity and no parity, errors cannot be detected.
• Even parity
If the number of bits with a value of “1” in the transmit data is odd, the parity bit is set to “1”, and if the number of
“1” bits is even, the parity bit is set to “0”. Control is thus performed to make the number of “1” bits in the transmit
data plus the parity bit an even number. In reception, the number of “1” bits in the receive data plus the parity bit
is counted, and if this number is odd, a parity error is generated.
• Odd parity
Conversely to the case of even parity, control is performed to make the number of “1“ bits in the transmit data plus
the parity bit an odd number.
In reception, a parity error is generated if the number of “1” bits in the receive data plus the parity bit is even.
• 0 parity
In transmission, the parity bit is set to “0” irrespective of the receive data.
In reception, parity bit detection is not performed. Therefore, no parity error is generated irrespective of whether the
parity bit is “0” or “1”.
• No parity
In transmission, a parity bit is not added.
In reception, reception is performed on the assumption that there is no parity bit. Since there is no parity bit, no parity
error is generated.
436
Preliminary User’s Manual U13987EJ1V0UM00