AT90CAN128-16AE ATMEL Corporation, AT90CAN128-16AE Datasheet - Page 181
AT90CAN128-16AE
Manufacturer Part Number
AT90CAN128-16AE
Description
8-bit Avr Microcontroller With 128K Bytes of Isp Flash And CAN Controller.flash (Kbytes) 128 Vcc (V) 2.7-5.5 EEPROM (Kbytes) 4 SRAM (bytes) 4K CAN (mess. Obj.) 15
Manufacturer
ATMEL Corporation
Datasheet
1.AT90CAN128-16AE.pdf
(391 pages)
- Current page: 181 of 391
- Download datasheet (6Mb)
Receiving Frames with 9 Data
Bits
4250C–CAN–03/04
The following code example shows a simple USART0 receive function based on polling
of the Receive Complete (RXC0) flag. When using frames with less than eight bits the
most significant bits of the data read from the UDR0 will be masked to zero. The
USART0 has to be initialized before the function can be used.
Note:
The function simply waits for data to be present in the receive buffer by checking the
RXC0 flag, before reading the buffer and returning the value.
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 UDRn. This rule applies to the FEn,
DORn and UPEn 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.
Assembly Code Example
C Code Example
USART0_Receive:
unsigned char USART0_Receive (void )
{
}
; Wait for data to be received
lds
sbrs r18, RXC0
rjmp USART0_Receive
; Get and return received data from buffer
lds
ret
/* Wait for data to be received */
while ( ! (UCSR0A & (1<<RXC0)))
/* Get and return received data from buffer */
return UDR0;
1. The example code assumes that the part specific header file is included.
r18, UCSR0A
r16, UDR0
;
(1)
(1)
AT90CAN128
181
Related parts for AT90CAN128-16AE
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: