MOTOROLA
Chapter 15. Queued Serial Multi-Channel Module
15-57
Serial Communication Interface
15.7.7.4 Parity Checking
The PT bit in SCCxR1 selects either even (PT = 0) or odd (PT = 1) parity. PT affects
received and transmitted data. The PE bit in SCCxR1 determines whether parity checking
is enabled (PE = 1) or disabled (PE = 0). When PE is set, the MSB of data in a frame (i.e.,
the bit preceding the stop bit) is used for the parity function. For transmitted data, a parity
bit is generated. For received data, the parity bit is checked. When parity checking is
enabled, the PF bit in the SCI status register (SCxSR) is set if a parity error is detected.
Enabling parity affects the number of data bits in a frame, which can in turn affect frame
size.
Table 15-31 shows possible data and parity formats.
15.7.7.5 Transmitter Operation
The transmitter consists of a serial shifter and a parallel data register (TDRx) located in the
SCI data register (SCxDR). The serial shifter cannot be directly accessed by the CPU. The
transmitter is double-buffered, which means that data can be loaded into the TDRx while
other data is shifted out. The TE bit in SCCxR1 enables (TE = 1) and disables (TE = 0) the
transmitter.
The shifter output is connected to the TXD pin while the transmitter is operating (TE = 1,
or TE = 0 and transmission in progress). Wired-OR operation should be specified when
more than one transmitter is used on the same SCI bus. The WOMS bit in SCCxR1
determines whether TXD is an open drain (wired-OR) output or a normal CMOS output.
An external pull-up resistor on TXD is necessary for wired-OR operation. WOMS controls
TXD function, regardless of whether the pin is used by the SCI or as a general-purpose
output pin.
Data to be transmitted is written to SCxDR, then transferred to the serial shifter. Before
writing to TDRx, the transmit data register empty (TDRE) flag in SCxSR should be
checked. When TDRE = 0, the TDRx contains data that has not been transferred to the
shifter. Writing to SCxDR again overwrites the data. If TDRE = 1, then TDRx is empty, and
new data may be written to TDRx, clearing TDRE.
As soon as the data in the transmit serial shifter has shifted out and if a new data frame is
in TDRx (TDRE = 0), then the new data is transferred from TDRx to the transmit serial
shifter and TDRE is set automatically. An interrupt may optionally be generated at this
point.
Table 15-31. Effect of Parity Checking on Data Size
MPE
Result
0
8 data bits
0
1
7 data bits, 1 parity bit
1
0
9 data bits
1
8 data bits, 1 parity bit