|
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
|
▷ |