USART Control and Status
Register C – UCSRnC
Writing this bit to one enables the USARTn Receiver. The Receiver will override normal
port operation for the RxDn pin when enabled. Disabling the Receiver will flush the
receive buffer invalidating the FEn, DORn and UPEn flags.
• Bit 3 – TXENn: Transmitter Enable
Writing this bit to one enables the USARTn Transmitter. The Transmitter will override
normal port operation for the TxDn pin when enabled. The disabling of the Transmitter
(writing TXENn to zero) will not become effective until ongoing and pending transmis-
sions are completed, i.e., when the Transmit Shift Register and transmit buffer register
do not contain data to be transmitted. When disabled, the transmitter will no longer over-
ride the TxDn port.
• Bit 2 – UCSZn2: Character Size
The UCSZn2 bits combined with the UCSZn1:0 bit in UCSRnC sets the number of data
bits (character size) in a frame the Receiver and Transmitter use.
• Bit 1 – RXB8n: Receive Data Bit 8
RXB8n is the ninth data bit of the received character when operating with serial frames
with 9-data bits. Must be read before reading the low bits from UDRn.
• Bit 0 – TXB8n: Transmit Data Bit 8
TXB8n is the 9th data bit in the character to be transmitted when operating with serial
frames with 9 data bits. Must be written before writing the low bits to UDRn.
Bit
Read/Write
Initial Value
7
–
R/W
0
6
UMSELn
R/W
0
5
UPMn1
R/W
0
4
UPMn0
R/W
0
3
USBSn
R/W
0
2
UCSZn1
R/W
1
1
UCSZn0
R/W
1
0
UCPOLn
R/W
0
UCSRnC
Note that this register is not available in ATmega103 compatibility mode.
• Bit 7 – Reserved Bit
This bit is reserved for future use. For compatibility with future devices, these bit must be
written to zero when UCSRnC is written.
• Bit 6 – UMSELn: USART Mode Select
This bit selects between Asynchronous and Synchronous mode of operation.
Table 77. UMSELn Bit Settings
UMSELn
Mode
0
Asynchronous Operation
1
Synchronous Operation
• Bit 5:4 – UPMn1:0: Parity Mode
These bits enable and set type of parity generation and check. If enabled, the Transmit-
ter will automatically generate and send the parity of the transmitted data bits within
each frame. The Receiver will generate a parity value for the incoming data and com-
pare it to the UPMn0 setting. If a mismatch is detected, the UPEn flag in UCSRnA will be
set.
192 ATmega128
2467O–AVR–10/06