ATMEGA48V_11 ATMEL [ATMEL Corporation], ATMEGA48V_11 Datasheet - Page 206

no-image

ATMEGA48V_11

Manufacturer Part Number
ATMEGA48V_11
Description
8-bit Atmel Microcontroller with 4/8/16K Bytes In-System Programmable Flash
Manufacturer
ATMEL [ATMEL Corporation]
Datasheet
21.8
21.8.1
21.8.2
21.8.3
2545T–AVR–05/11
Register description
UDRn – USART MSPIM I/O data register
UCSRnA – USART MSPIM control and status register n A
UCSRnB – USART MSPIM control and status register n B
The following section describes the registers used for SPI operation using the USART.
The function and bit description of the USART data register (UDRn) in MSPI mode is identical to
normal USART operation.
• Bit 7 - RXCn: USART receive complete
This flag bit is set when there are unread data in the receive buffer and cleared when the receive
buffer is empty (that is, does not contain any unread data). If the Receiver is disabled, the
receive buffer will be flushed and consequently the RXCn bit will become zero. The RXCn Flag
can be used to generate a Receive Complete interrupt (see description of the RXCIEn bit).
• Bit 6 - TXCn: USART transmit complete
This flag bit is set when the entire frame in the Transmit Shift Register has been shifted out and
there are no new data currently present in the transmit buffer (UDRn). The TXCn Flag bit is auto-
matically cleared when a transmit complete interrupt is executed, or it can be cleared by writing
a one to its bit location. The TXCn Flag can generate a Transmit Complete interrupt (see
description of the TXCIEn bit).
• Bit 5 - UDREn: USART data register empty
The UDREn Flag indicates if the transmit buffer (UDRn) is ready to receive new data. If UDREn
is one, the buffer is empty, and therefore ready to be written. The UDREn Flag can generate a
Data Register Empty interrupt (see description of the UDRIE bit). UDREn is set after a reset to
indicate that the Transmitter is ready.
• Bit 4:0 - Reserved bits in MSPI mode
When in MSPI mode, these bits are reserved for future use. For compatibility with future devices,
these bits must be written to zero when UCSRnA is written.
• Bit 7 - RXCIEn: RX complete interrupt enable
Writing this bit to one enables interrupt on the RXCn Flag. A USART Receive Complete interrupt
will be generated only if the RXCIEn bit is written to one, the Global Interrupt Flag in SREG is
written to one and the RXCn bit in UCSRnA is set.
Bit
Read/write
Initial value
Bit
Read/write
Initial value
RXCn
R
7
0
RXCIEn
R/W
7
0
TXCn
R/W
6
0
See “UDRn – USART I/O data register n” on page 190.
TXCIEn
R/W
6
0
UDREn
R
5
0
UDRIE
R/W
5
0
R
4
0
-
RXENn
R/W
4
0
R
3
0
-
TXENn
R/W
3
0
R
2
1
-
ATmega48/88/168
2
R
1
-
R
1
1
-
R
1
1
-
R
0
0
-
R
0
0
-
UCSRnB
UCSRnA
206

Related parts for ATMEGA48V_11