ATMEga64L ATMEL Corporation, ATMEga64L Datasheet - Page 180
ATMEga64L
Manufacturer Part Number
ATMEga64L
Description
8-bit AVR Microcontroller with 64K Bytes In-System Programmable Flash
Manufacturer
ATMEL Corporation
Datasheet
1.ATMEGA64L.pdf
(363 pages)
Available stocks
Company
Part Number
Manufacturer
Quantity
Price
Company:
Part Number:
ATMEga64L-16AU
Manufacturer:
ROHM
Quantity:
40 000
Part Number:
ATMEga64L-8AI
Manufacturer:
AT
Quantity:
20 000
Part Number:
ATMEga64L-8AQ
Manufacturer:
AT
Quantity:
20 000
Company:
Part Number:
ATMEga64L-8AU
Manufacturer:
ATMEL
Quantity:
4 000
Company:
Part Number:
ATMEga64L-8AU
Manufacturer:
ATMEL
Quantity:
451
Part Number:
ATMEga64L-8AU
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Part Number:
ATMEga64L-8MI
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Part Number:
ATMEga64L-8MUR
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Company:
Part Number:
ATMEga64L8AJ
Manufacturer:
ATMEL
Quantity:
6 973
- Current page: 180 of 363
- Download datasheet (4Mb)
Receiving Frames with 9 Data
Bits
180
ATmega64(L)
If 9-bit characters are used (UCSZ=7) the ninth bit must be read from the RXB8 bit in
UCSRB before reading the low bits from the UDR. This rule applies to the FE, DOR,
and UPE status flags as well. Read status from UCSRA, then data from UDR. Reading
the UDR I/O location will change the state of the receive buffer FIFO and consequently
the TXB8, FE, DOR, and UPE bits, which all are stored in the FIFO, will change. The fol-
lowing 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 UCSRA, RXC
rjmp USART_Receive
; Get status and ninth bit, then data from buffer
in
in
in
; If error, return -1
andi r18,(1<<FE)|(1<<DOR)|(1<<UPE)
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 ( !(UCSRA & (1<<RXC)) )
/* Get status and ninth bit, then data */
/* from buffer */
status = UCSRA;
resh = UCSRB;
resl = UDR;
/* If error, return -1 */
if ( status & (1<<FE)|(1<<DOR)|(1<<UPE) )
/* Filter the ninth bit, then return */
resh = (resh >> 1) & 0x01;
return ((resh << 8) | resl);
1. The code assumes that the part specific header file is included. For I/O Registers
return -1;
located in extended I/O map, “IN”, “OUT”, “SBIS”, “SBIC”, “CBI”, and “SBI” instruc-
r18, UCSRA
r17, UCSRB
r16, UDR
r17, HIGH(-1)
r16, LOW(-1)
r17
;
(1)
(1)
2490G–AVR–03/04
Related parts for ATMEga64L
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
INTERVAL AND WIPE/WASH WIPER CONTROL IC WITH DELAY
Manufacturer:
ATMEL Corporation
Datasheet:
Part Number:
Description:
Low-Voltage Voice-Switched IC for Hands-Free Operation
Manufacturer:
ATMEL Corporation
Datasheet:
Part Number:
Description:
MONOLITHIC INTEGRATED FEATUREPHONE CIRCUIT
Manufacturer:
ATMEL Corporation
Datasheet:
Part Number:
Description:
AM-FM Receiver IC U4255BM-M
Manufacturer:
ATMEL Corporation
Datasheet:
Part Number:
Description:
Monolithic Integrated Feature Phone Circuit
Manufacturer:
ATMEL Corporation
Datasheet:
Part Number:
Description:
Multistandard Video-IF and Quasi Parallel Sound Processing
Manufacturer:
ATMEL Corporation
Datasheet:
Part Number:
Description:
High-performance EE PLD
Manufacturer:
ATMEL Corporation
Datasheet:
Part Number:
Description:
8-bit Flash Microcontroller
Manufacturer:
ATMEL Corporation
Datasheet:
Part Number:
Description:
2-Wire Serial EEPROM
Manufacturer:
ATMEL Corporation
Datasheet:
Part Number:
Description:
U6046BREAR WINDOW HEATING TIMER / LONG-TERM TIMER
Manufacturer:
ATMEL Corporation
Datasheet: