NEC 78K0 User Manual page 311

8-bit single-chip microcontrollers
Hide thumbs Also See for 78K0:
Table of Contents

Advertisement

(b) Parity types and operation
The parity bit is used to detect a bit error in communication data. Usually, the same type of parity bit is used
on both the transmission and reception sides. With even parity and odd parity, a 1-bit (odd number) error
can be detected. With zero parity and no parity, an error cannot be detected.
(i)
Even parity
• Transmission
Transmit data, including the parity bit, is controlled so that the number of bits that are "1" is even.
The value of the parity bit is as follows.
If transmit data has an odd number of bits that are "1": 1
If transmit data has an even number of bits that are "1": 0
• Reception
The number of bits that are "1" in the receive data, including the parity bit, is counted. If it is odd, a
parity error occurs.
(ii) Odd parity
• Transmission
Unlike even parity, transmit data, including the parity bit, is controlled so that the number of bits that
are "1" is odd.
If transmit data has an odd number of bits that are "1": 0
If transmit data has an even number of bits that are "1": 1
• Reception
The number of bits that are "1" in the receive data, including the parity bit, is counted. If it is even, a
parity error occurs.
(iii) 0 parity
The parity bit is cleared to 0 when data is transmitted, regardless of the transmit data.
The parity bit is not detected when the data is received. Therefore, a parity error does not occur
regardless of whether the parity bit is "0" or "1".
(iv) No parity
No parity bit is appended to the transmit data.
Reception is performed assuming that there is no parity bit when data is received. Because there is no
parity bit, a parity error does not occur.
CHAPTER 14 SERIAL INTERFACE UART0
*
User's Manual U15947EJ2V0UD
311

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

78kf1

Table of Contents