Datasheet
21.12.1. USART I/O Data Register n
The USART Transmit Data Buffer Register and USART Receive Data Buffer Registers share the same
I/O address referred to as USART Data Register or UDRn. The Transmit Data Buffer Register (TXB) will
be the destination for data written to the UDR1 Register location. Reading the UDRn Register location will
return the contents of the Receive Data Buffer Register (RXB).
For 5-, 6-, or 7-bit characters the upper unused bits will be ignored by the Transmitter and set to zero by
the Receiver.
The transmit buffer can only be written when the UDRE Flag in the UCSRnA Register is set. Data written
to UDRn when the UCSRnA.UDRE Flag is not set, will be ignored by the USART Transmitter n. When
data is written to the transmit buffer, and the Transmitter is enabled, the Transmitter will load the data into
the Transmit Shift Register when the Shift Register is empty. Then the data will be serially transmitted on
the TxDn pin.
The receive buffer consists of a two level FIFO. The FIFO will change its state whenever the receive
buffer is accessed. Due to this behavior of the receive buffer, do not use Read-Modify-Write instructions
(SBI and CBI) on this location. Be careful when using bit test instructions (SBIC and SBIS), since these
also will change the state of the FIFO.
Name: UDRn
Offset: 0xC6 + n*0x08 [n=0..1]
Reset: 0x00
Property:
-
Bit 7 6 5 4 3 2 1 0
TXB / RXB[7:0]
Access
R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bits 7:0 – TXB / RXB[7:0]: USART Transmit / Receive Data Buffer
Atmel ATmega644A [DATASHEET]
Atmel-42716C-ATmega644A_Datasheet_Complete-10/2016
243