ATmega1281R231 Atmel Corporation, ATmega1281R231 Datasheet - Page 237

no-image

ATmega1281R231

Manufacturer Part Number
ATmega1281R231
Description
Manufacturer
Atmel Corporation
Datasheets

Specifications of ATmega1281R231

Flash (kbytes)
128 Kbytes
Max. Operating Frequency
16 MHz
Max I/o Pins
54
Spi
3
Twi (i2c)
1
Uart
2
Adc Channels
8
Adc Resolution (bits)
10
Adc Speed (ksps)
15
Analog Comparators
1
Crypto Engine
AES
Sram (kbytes)
8
Eeprom (bytes)
4096
Operating Voltage (vcc)
1.8 to 3.6
Timers
6
Frequency Band
2.4 GHz
Max Data Rate (mb/s)
2
Antenna Diversity
Yes
External Pa Control
Yes
Power Output (dbm)
3
Receiver Sensitivity (dbm)
-101
Receive Current Consumption (ma)
13.2
Transmit Current Consumption (ma)
14.4
Link Budget (dbm)
104
23.5.1
23.5.2
23.6
23.6.1
2549N–AVR–05/11
USART MSPIM Register Description
Transmitter and Receiver Flags and Interrupts
Disabling the Transmitter or Receiver
UDRn – USART MSPIM I/O Data Register
Note:
The RXCn, TXCn, and UDREn flags and corresponding interrupts in USART in MSPIM mode
are identical in function to the normal USART operation. However, the receiver error status flags
(FE, DOR, and PE) are not in use and is always read as zero.
The disabling of the transmitter or receiver in USART in MSPIM mode is identical in function to
the normal USART operation.
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.
Assembly Code Example
C Code Example
USART_MSPIM_Transfer:
USART_MSPIM_Wait_RXCn:
unsigned char USART_Receive( void )
{
}
; Wait for empty transmit buffer
sbis UCSRnA, UDREn
rjmp USART_MSPIM_Transfer
; Put data (r16) into buffer, sends the data
out UDRn,r16
; Wait for data to be received
sbis UCSRnA, RXCn
rjmp USART_MSPIM_Wait_RXCn
; Get and return received data from buffer
in r16, UDRn
ret
/* Wait for empty transmit buffer */
while ( !( UCSRnA & (1<<UDREn)) );
/* Put data into buffer, sends the data */
UDRn = data;
/* Wait for data to be received */
while ( !(UCSRnA & (1<<RXCn)) );
/* Get and return received data from buffer */
return UDRn;
1.
See “About Code Examples” on page 11.
(1)
See “UDRn – USART I/O Data Register n” on page 222.
(1)
ATmega640/1280/1281/2560/2561
237

Related parts for ATmega1281R231