ATMEGA64-16AI Atmel, ATMEGA64-16AI Datasheet - Page 182

IC AVR MCU 64K 16MHZ IND 64-TQFP

ATMEGA64-16AI

Manufacturer Part Number
ATMEGA64-16AI
Description
IC AVR MCU 64K 16MHZ IND 64-TQFP
Manufacturer
Atmel
Series
AVR® ATmegar
Datasheets

Specifications of ATMEGA64-16AI

Core Processor
AVR
Core Size
8-Bit
Speed
16MHz
Connectivity
I²C, SPI, UART/USART
Peripherals
Brown-out Detect/Reset, POR, PWM, WDT
Number Of I /o
53
Program Memory Size
64KB (32K x 16)
Program Memory Type
FLASH
Eeprom Size
2K x 8
Ram Size
4K x 8
Voltage - Supply (vcc/vdd)
4.5 V ~ 5.5 V
Data Converters
A/D 8x10b
Oscillator Type
Internal
Operating Temperature
-40°C ~ 85°C
Package / Case
64-TQFP, 64-VQFP
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
ATMEGA64-16AI
Manufacturer:
Atmel
Quantity:
10 000
Receiving Frames with
9 Data Bits
2490Q–AVR–06/10
If 9-bit characters are used (UCSZn=7) the ninth bit must be read from the RXB8n bit in
UCSRnB before reading the low bits from the UDR. This rule applies to the FEn, DORn, and
UPE status flags as well. Read status from UCSRnA, then data from UDRn. Reading the UDRn
I/O location will change the state of the receive buffer FIFO and consequently the TXB8n, FEn,
DORn, and UPEn bits, which all are stored in the FIFO, will change. The following code example
shows a simple USART receive function that handles both nine bit characters and the status
bits.
Note:
Assembly Code Example
C Code Example
USART_Receive:
USART_ReceiveNoError:
unsigned int USART_Receive( void )
{
}
; Wait for data to be received
sbis UCSRnA, RXCn
rjmp USART_Receive
; Get status and ninth bit, then data from buffer
in
in
in
; If error, return -1
andi r18,(1<<FEn)|(1<<DORn)|(1<<UPEn)
breq USART_ReceiveNoError
ldi
ldi
; Filter the ninth bit, then return
lsr
andi r17, 0x01
ret
unsigned char status, resh, resl;
/* Wait for data to be received */
while ( !(UCSRnA & (1<<RXCn)) )
/* Get status and ninth bit, then data */
/* from buffer */
status = UCSRnA;
resh = UCSRnB;
resl = UDRn;
/* If error, return -1 */
if ( status & (1<<FEn)|(1<<DORn)|(1<<UPEn) )
/* Filter the ninth bit, then return */
resh = (resh >> 1) & 0x01;
return ((resh << 8) | resl);
1. See “About Code Examples” on page 9.
return -1;
r18, UCSRnA
r17, UCSRnB
r16, UDRn
r17, HIGH(-1)
r16, LOW(-1)
r17
;
(1)
(1)
ATmega64(L)
182

Related parts for ATMEGA64-16AI