AT90CAN32 Automotive Atmel Corporation, AT90CAN32 Automotive Datasheet - Page 186

no-image

AT90CAN32 Automotive

Manufacturer Part Number
AT90CAN32 Automotive
Description
Manufacturer
Atmel Corporation

Specifications of AT90CAN32 Automotive

Flash (kbytes)
32 Kbytes
Pin Count
64
Max. Operating Frequency
16 MHz
Cpu
8-bit AVR
# Of Touch Channels
16
Hardware Qtouch Acquisition
No
Max I/o Pins
53
Ext Interrupts
8
Usb Speed
No
Usb Interface
No
Spi
1
Twi (i2c)
1
Uart
2
Can
1
Graphic Lcd
No
Video Decoder
No
Camera Interface
No
Adc Channels
8
Adc Resolution (bits)
10
Adc Speed (ksps)
15
Analog Comparators
1
Resistive Touch Screen
No
Temp. Sensor
No
Crypto Engine
No
Sram (kbytes)
2
Eeprom (bytes)
1024
Self Program Memory
YES
Dram Memory
No
Nand Interface
No
Picopower
No
Temp. Range (deg C)
-40 to 125
I/o Supply Class
2.7 to 5.5
Operating Voltage (vcc)
2.7 to 5.5
Fpu
No
Mpu / Mmu
no / no
Timers
4
Output Compare Channels
8
Input Capture Channels
2
Pwm Channels
7
32khz Rtc
Yes
Calibrated Rc Oscillator
Yes
17.8.2
186
AT90CAN32/64/128
Receiving Frames with 9 Data Bits
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 UCS-
RnB 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
rjmp
; 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
r18, RXC0
USART0_Receive
r16, UDR0
(1)
(1)
7682C–AUTO–04/08

Related parts for AT90CAN32 Automotive