– 133 Powerful Instructions – Most Single Clock Cycle Execution
– 32 x 8 General Purpose Working Registers + Peripheral Control Registers
– Fully Static Operation
– Up to 16 MIPS Throughput at 16 MHz
– On-chip 2-cycle Multiplier
• Non volatile Program and Data Memories
– 32K/64K/128K Bytes of In-System Reprogrammable Flash (AT90CAN32/64/128)
• Endurance: 10,000 Write/Erase Cycles
– Optional Boot Code Section with Independent Lock Bits
• In-System Programming by On-Chip Boot Program (CAN, UART, ...)
• True Read-While-Write Operation
– 1K/2K/4K
– 2K/4K/4K Bytes Internal SRAM (AT90CAN32/64/128)
– Up to 64K Bytes Optional External Memory Space
– Programming Lock for Software Security
• JTAG (IEEE std. 1149.1 Compliant) Interface
– Boundary-scan Capabilities According to the JTAG Standard
– Programming Flash (Hardware ISP), EEPROM, Lock & Fuse Bits
– Extensive On-chip Debug Support
• CAN Controller 2.0A & 2.0B - ISO 16845 Certified
– 15 Full Message Objects with Separate Identifier Tags and Masks
– Transmit, Receive, Automatic Reply and Frame Buffer Receive Modes
– 1Mbits/s Maximum Transfer Rate at 8 MHz
– Time stamping, TTC & Listening Mode (Spying or Autobaud)
• Output Compare Modulation
– 8-channel, 10-bit SAR ADC
• 8 Single-ended Channels
• 7 Differential Channels
• 2 Differential Channels With Programmable Gain at 1x, 10x, or 200x
– On-chip Analog Comparator
– Byte-oriented Two-wire Serial Interface
– Dual Programmable Serial USART
– Master/Slave SPI Serial Interface
8-bit
Microcontroller
with
32K/64K/128K
Bytes of
ISP Flash
and
CAN Controller
AT90CAN32
AT90CAN64
AT90CAN128
Automotive
Summary
Note:1. See details on Section 19.4.3 on page 241.
Rev. 7682CS–AUTO–04/08
1
Page 2
1.Description
1.1Comparison Between AT90CAN32, AT90CAN64 and AT90CAN128
AT90CAN32, AT90CAN64 and AT90CAN128 are all hardware and software compatible with
each other, the only difference is the memory size.
Table 1-1.Memory Size Summary
DeviceFlashEEPROMRAM
AT90CAN3232K Bytes1K Byte2K Bytes
AT90CAN6464K Bytes2K Bytes4K Bytes
AT90CAN128128K Bytes4K Byte4K Bytes
1.2Part Description
The AT90CAN32/64/128 is a low-power CMOS 8-bit microcontroller based on the AVR
enhanced RISC architecture. By executing powerful instructions in a single clock cycle, the
AT90CAN32/64/128 achieves throughputs approaching 1 MIPS per MHz allowing the system
designer to optimize power consumption versus processing speed.
The AVR core combines a rich instruction set with 32 general purpose working registers. All 32
registers are directly connected to the Arithmetic Logic Unit (ALU), allowing two independent
registers to be accessed in one single instruction executed in one clock cycle. The resulting
architecture is more code efficient while achieving throughputs up to ten times faster than conventional CISC microcontrollers.
The AT90CAN32/64/128 provides the following features: 32K/64K/128K bytes of In-System Programmable Flash with Read-While-Write capabilities, 1K/2K/4K bytes EEPROM, 2K/4K/4K
bytes SRAM, 53 general purpose I/O lines, 32 general purpose working registers, a CAN controller, Real Time Counter (RTC), four flexible Timer/Counters with compare modes and PWM, 2
USARTs, a byte oriented Two-wire Serial Interface, an 8-channel 10-bit ADC with optional differential input stage with programmable gain, a programmable Watchdog Timer with Internal
Oscillator, an SPI serial port, IEEE std. 1149.1 compliant JTAG test interface, also used for
accessing the On-chip Debug system and programming and five software selectable power saving modes.
The Idle mode stops the CPU while allowing the SRAM, Timer/Counters, SPI/CAN ports and
interrupt system to continue functioning. The Power-down mode saves the register contents but
freezes the Oscillator, disabling all other chip functions until the next interrupt or Hardware
Reset. In Power-save mode, the asynchronous timer continues to run, allowing the user to maintain a timer base while the rest of the device is sleeping. The ADC Noise Reduction mode stops
the CPU and all I/O modules except Asynchronous Timer and ADC, to minimize switching noise
during ADC conversions. In Standby mode, the Crystal/Resonator Oscillator is running while the
rest of the device is sleeping. Thi s allows very fast start-up combin ed with low po wer
consumption.
The device is manufactured using Atmel’s high-density nonvolatile memory technology. The Onchip ISP Flash allows the program memory to be reprogrammed in-system through an SPI serial
interface, by a conventional nonvolatile memory programmer, or by an On-chip Boot program
running on the AVR core. The boot program can use any interface to download the application
program in the application Flash memory. Software in the Boot Flash section will continue to run
while the Application Flash section is updated, providing true Read-While-Write operation. By
2
AT90CAN32/64/128
7682CS–AUTO–04/08
Page 3
combining an 8-bit RISC CPU with In-System Self-Programmable Flash on a monolithic chip,
the Atmel AT90CAN32/64/128 is a powerful microcontroller that provides a highly flexible and
cost effective solution to many embedded control applications.
The AT90CAN32/64/128 AVR is supported with a full suite of program and system development
tools including: C compilers, macro assemblers, program debugger/simulators, in-circuit emulators, and evaluation kits.
1.3Disclaimer
Typical values contained in this datasheet are based on simulations and characterization of
other AVR microcontrollers manufactured on the same process technology. Min and Max values
will be available after the device is characterized.
1.4Automotive Quality Grade
The AT90CAN32/64/128 have been developed and manufactured according to the most stringent requirements of the international standard ISO-TS-16949 grade 1. This data sheet contains
limit values extracted from the results of extensive characterization (Temperature and Voltage).
The quality and reliability of the AT90CAN32/64/128 have been verified during regular product
qualification as per AEC-Q100.
AT90CAN32/64/128
As indicated in the ordering information paragraph, the products are available in three different
temperature grades, but with equivalent quality and reliability objectives. Different temperature
identifiers have been defined as listed in Table 1-2.
Table 1-2.Temperature Grade Identification for Automotive Products
TemperatureTemperature
Identifier
-40 ; +85TSimilar to Industrial Temperature Grade but with
Automotive Quality
-40 ; +105T1Reduced Automotive Temperature Range
-40 ; +125ZFull AutomotiveTemperature Range
Comments
7682CS–AUTO–04/08
3
Page 4
1.5Block Diagram
PROGRAM
COUNTER
STACK
POINTER
PROGRAM
FLASH
MCU CONTROL
REGISTER
SRAM
GENERAL
PURPOSE
REGISTERS
INSTRUCTION
REGISTER
TIMER/
COUNTERS
INSTRUCTION
DECODER
DATADIR.
REG.PORTB
DATADIR.
REG.PORTE
DATADIR.
REG.PORTA
DATADIR.
REG.PORTD
DATAREGISTER
PORTB
DATAREGISTER
PORTE
DATAREGISTER
PORTA
DATAREGISTER
PORTD
INTERRUPT
UNIT
EEPROM
SPIUSART0
STATUS
REGISTER
Z
Y
X
ALU
PORTB DRIVERS
PORTE DRIVERS
PORTA DRIVERS
PORTF DRIVERS
PORTD DRIVERS
PORTC DRIVERS
PB7 - PB0PE7 - PE0
PA7 - PA0PF7 - PF0
RESET
VCC
AGND
GND
AREF
XTAL1
XTAL2
CONTROL
LINES
+
-
ANALOG
COMPARATOR
PC7 - PC0
INTERNAL
OSCILLATOR
WATCHDOG
TIMER
8-BIT DATA BUS
AVCC
USART1
TIMING AND
CONTROL
OSCILLATOR
OSCILLATOR
CALIB. OSC
DATADIR.
REG.PORTC
DATAREGISTER
PORTC
ON-CHIP DEBUG
JTAG TAP
PROGRAMMING
LOGIC
BOUNDARY-
SCAN
DATADIR.
REG.PORTF
DATAREGISTER
PORTF
ADC
POR - BOD
RESET
PD7 - PD0
DATADIR.
REG.PORTG
DATAREG.
PORTG
PORTG DRIVERS
PG4 - PG0
TWO-WIRE SERIAL
INTERFACE
CAN
CONTROLLER
Figure 1-1.Block Diagram
4
AT90CAN32/64/128
7682CS–AUTO–04/08
Page 5
1.6Pin Configurations
PC0 (A8)
VCC
GND
PF0 (ADC0)
PF7 (ADC7 / TDI)
PF1 (ADC1)
PF2 (ADC2)
PF3 (ADC3)
PF4 (ADC4 / TCK)
PF5 (ADC5 / TMS)
PF6 (ADC6 / TDO)
AREF
GND
AVCC
17
61
60
18
592058
19
21
572256
235524
54
25
532652
27
51
29
28
50
49
32
31
30
(RXD0 / PDI) PE0
(TXD0 / PDO) PE1
(XCK0 / AIN0) PE2
(OC3A / AIN1) PE3
(OC3B / INT4) PE4
(OC3C / INT5) PE5
(T3 / INT6) PE6
(ICP3 / INT7) PE7
(SS) PB0
(SCK) PB1
(MOSI) PB2
(MISO) PB3
(OC2A) PB4
(OC0A / OC1C) PB7
(TOSC2 ) PG3
(OC1B) PB6
(TOSC1 ) PG4
(OC1A) PB5
PC1 (A9)
(T0) PD7
PC2 (A10)
PC3 (A11)
PC4 (A12)
PC5 (A13)
PC6 (A14)
PC7 (A15 / CLKO)
PA7 (AD7)
PG2 (ALE)
PA6 (AD6)
PA5 (AD5)
PA4 (AD4)
PA3 (AD3)
PA0 (AD0)
PA1 (AD1)
PA2 (AD2)
(RXCAN / T1) PD6
(TXCAN / XCK1) PD5
(ICP1) PD4
(TXD1 / INT3) PD3
(RXD1 / INT2) PD2
(SDA / INT1) PD1
(SCL / INT0) PD0
XTAL1
XTAL2
RESET
GND
VCC
PG1 (RD)
PG0 (WR)
2
3
1
4
5
6
7
8
9
10
11
12
13
14
16
15
64
63
62
47
46
48
45
44
43
42
41
40
39
38
37
36
35
33
34
(2)
(2)
NC = Do not connect (May be used in future devices)
(1)
Timer2 Oscillator
(2)
NC
(1)
(64-lead TQFP top view)
INDEX CORNER
Figure 1-2.Pinout AT90CAN32/64/128 - TQFP
AT90CAN32/64/128
7682CS–AUTO–04/08
5
Page 6
Figure 1-3.Pinout AT90CAN32/64/128 - QFN
NC = Do not connect (May be used in future devices)
(1)
Timer2 Oscillator
(2)
PC0 (A8)
VCC
GND
PF0 (ADC0)
PF7 (ADC7 / TDI)
PF1 (ADC1)
PF2 (ADC2)
PF3 (ADC3)
PF4 (ADC4 / TCK)
PF5 (ADC5 / TMS)
PF6 (ADC6 / TDO)
AREF
GND
AVCC
(RXD0 / PDI) PE0
(TXD0 / PDO) PE1
(XCK0 / AIN0) PE2
(OC3A / AIN1) PE3
(OC3B / INT4) PE4
(OC3C / INT5) PE5
(T3 / INT6) PE6
(ICP3 / INT7) PE7
(SS) PB0
(SCK) PB1
(MOSI) PB2
(MISO) PB3
(OC2A) PB4
(OC0A / OC1C) PB7
(TOSC2 ) PG3
(OC1B) PB6
(TOSC1 ) PG4
(OC1A) PB5
PC1 (A9)
(T0) PD7
PC2 (A10)
PC3 (A11)
PC4 (A12)
PC5 (A13)
PC6 (A14)
PC7 (A15 / CLKO)
PA7 (AD7)
PG2 (ALE)
PA6 (AD6)
PA5 (AD5)
PA4 (AD4)
PA3 (AD3)
PA0 (AD0)
PA1 (AD1)
PA2 (AD2)
(RXCAN / T1) PD6
(TXCAN / XCK1) PD5
(ICP1) PD4
(TXD1 / INT3) PD3
(RXD1 / INT2) PD2
(SDA / INT1) PD1
(SCL / INT0) PD0
XTAL1
XTAL2
RESET
GND
VCC
PG1 (RD)
PG0 (WR)
2
3
1
4
5
6
7
8
9
10
11
12
13
14
1633
15
47
46
48
45
44
43
42
41
40
39
38
37
36
35
34
(2)
(2)
NC
(1)
17
182019
21222324252627
29
28
32
31
30
525150
49
6463625361605958575655
54
(64-lead QFN top view)
INDEX CORNER
1.7Pin Descriptions
1.7.1VCC
1.7.2GND
6
AT90CAN32/64/128
Note:The large center pad underneath the QFN package is made of metal and internally connected to
Digital supply voltage.
Ground.
GND. It should be soldered or glued to the board to ensure good mechanical stability. If the center
pad is left unconnected, the package might loosen from the board.
7682CS–AUTO–04/08
Page 7
1.7.3Port A (PA7..PA0)
Port A is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The
Port A output buffers have symmetrical drive characteristics with both high sink and source
capability. As inputs, Port A pins that are externally pulled low will source current if the pull-up
resistors are activated. The Port A pins are tri-stated when a reset condition becomes active,
even if the clock is not running.
Port A also serves the functions of various special features of the AT90CAN32/64/128 as listed
on page 74.
1.7.4Port B (PB7..PB0)
Port B is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The
Port B output buffers have symmetrical drive characteristics with both high sink and source
capability. As inputs, Port B pins that are externally pulled low will source current if the pull-up
resistors are activated. The Port B pins are tri-stated when a reset condition becomes active,
even if the clock is not running.
Port B also serves the functions of various special features of the AT90CAN32/64/128 as listed
on page 76.
1.7.5Port C (PC7..PC0)
Port C is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The
Port C output buffers have symmetrical drive characteristics with both high sink and source
capability. As inputs, Port C pins that are externally pulled low will source current if the pull-up
resistors are activated. The Port C pins are tri-stated when a reset condition becomes active,
even if the clock is not running.
AT90CAN32/64/128
Port C also serves the functions of special features of the AT90CAN32/64/128 as listed on page
78.
1.7.6Port D (PD7..PD0)
Port D is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The
Port D output buffers have symmetrical drive characteristics with both high sink and source
capability. As inputs, Port D pins that are externally pulled low will source current if the pull-up
resistors are activated. The Port D pins are tri-stated when a reset condition becomes active,
even if the clock is not running.
Port D also serves the functions of various special features of the AT90CAN32/64/128 as listed
on page 80.
1.7.7Port E (PE7..PE0)
Port E is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The
Port E output buffers have symmetrical drive characteristics with both high sink and source
capability. As inputs, Port E pins that are externally pulled low will source current if the pull-up
resistors are activated. The Port E pins are tri-stated when a reset condition becomes active,
even if the clock is not running.
Port E also serves the functions of various special features of the AT90CAN32/64/128 as listed
on page 83.
1.7.8Port F (PF7..PF0)
Port F serves as the analog inputs to the A/D Converter.
7682CS–AUTO–04/08
7
Page 8
Port F also serves as an 8-bit bi-directional I/O port, if the A/D Converter is not used. Port pins
can provide internal pull-up resistors (selected for each bit). The Port F output buffers have symmetrical drive characteristics with both high sink and source capability. As inputs, Port F pins
that are externally pulled low will source current if the pull-up resistors are activated. The Port F
pins are tri-stated when a reset condition becomes active, even if the clock is not running.
Port F also serves the functions of the JTAG interface. If the JTAG interface is enabled, the pullup resistors on pins PF7(TDI), PF5(TMS), and PF4(TCK) will be activated even if a reset occurs.
1.7.9Port G (PG4..PG0)
Port G is a 5-bit I/O port with internal pull-up resistors (selected for each bit). The Port G output
buffers have symmetrical drive characteristics with both high sink and source capability. As
inputs, Port G pins that are externally pulled low will source current if the pull-up resistors are
activated. The Port G pins are tri-stated when a reset condition becomes active, even if the clock
is not running.
Port G also serves the functions of various special features of the AT90CAN32/64/128 as listed
on page 88.
1.7.10RESET
Reset input. A low level on this pin for longer than the minimum pulse length will generate a
reset. The minimum pulse length is given in characteristics. Shorter pulses are not guaranteed
to generate a reset. The I/O ports of the AVR are immediately reset to their initial state even if
the clock is not running. The clock is needed to reset the rest of the AT90CAN32/64/128.
1.7.11XTAL1
Input to the inverting Oscillator amplifier and input to the internal clock operating circuit.
1.7.12XTAL2
Output from the inverting Oscillator amplifier.
1.7.13AVCC
AVCC is the supply voltage pin for the A/D Converter on Port F. It should be externally connected to VCC, even if the ADC is not used. If the ADC is used, it should be connected to V
through a low-pass filter.
1.7.14AREF
This is the analog reference pin for the A/D Converter.
2.About Code Examples
This documentation contains simple code examples that briefly show how to use various parts of
the device. These code examples assume that the part specific header file is included before
compilation. Be aware that not all C compiler vendors include bit definitions in the header files
and interrupt handling in C is compiler dependent. Please confirm with the C compiler documentation for more details.
Notes:1. Address bits exceeding PCMSB (Table 25-11 on page 340) are don’t care.
2. Address bits exceeding EEAMSB (Table 25-12 on page 340) are don’t care.
3. For compatibility with future devices, reserved bits should be written to zero if accessed. Reserved I/O memory addresses
should never be written.
4. I/O Registers within the address range 0x00 - 0x1F are directly bit-accessible using the SBI and CBI instructions. In these
registers, the value of single bits can be checked by using the SBIS and SBIC instructions.
5. Some of the status flags are cleared by writing a logical one to them. Note that, unlike most other AVRs, the CBI and SBI
instructions will only operate on the specified bit, and can therefore be used on registers containing such status flags. The
CBI and SBI instructions work with registers 0x00 to 0x1F only.
6. When using the I/O specific commands IN and OUT, the I/O addresses 0x00 - 0x3F must be used. When addressing I/O
Registers as data space using LD and ST instructions, 0x20 must be added to these addresses. The AT90CAN32/64/128 is
a complex microcontroller with more peripheral units than can be supported within the 64 location reserved in Opcode for
the IN and OUT instructions. For the Extended I/O space from 0x60 - 0xFF in SRAM, only the ST/STS/STD and
LD/LDS/LDD instructions can be used.
12
AT90CAN32/64/128
7682CS–AUTO–04/08
Page 13
4.Ordering Information
AT90CAN32/64/128
Ordering Code
AT90CAN32-15AT162.7 - 5.5A2 64Automotive (-40° to +85°C)
AT90CAN32-15AT1162.7 - 5.5A2 64Automotive (-40° to +105°C)
AT90CAN32-15AZ162.7 - 5.5A2 64Automotive (-40° to +125°C)
AT90CAN32-15MT162.7 - 5.5Z64-1Automotive (-40° to +85°C)
AT90CAN32-15MT1162.7 - 5.5Z64-1Automotive (-40° to +105C)
AT90CAN32-15MZ162.7 - 5.5Z64-1Automotive (-40° to +125°C)
AT90CAN64-15AT162.7 - 5.5A2 64Automotive (-40° to +85°C)
AT90CAN64-15AT1162.7 - 5.5A2 64Automotive (-40° to +105°C)
AT90CAN64-15AZ162.7 - 5.5A2 64Automotive (-40° to +125°C)
AT90CAN64-15MT162.7 - 5.5Z64-2Automotive (-40° to +85°C)
AT90CAN64-15MT1162.7 - 5.5Z64-2Automotive (-40° to +105C)
AT90CAN64-15MZ162.7 - 5.5Z64-2Automotive (-40° to +125°C)
AT90CAN128-15AT162.7 - 5.5A2 64Automotive (-40° to +85°C)
AT90CAN128-15AT1162.7 - 5.5A2 64Automotive (-40° to +105°C)
AT90CAN128-15AZ162.7 - 5.5A2 64Automotive (-40° to +125°C)
AT90CAN128-15MT162.7 - 5.5Z64-2Automotive (-40° to +85°C)
AT90CAN128-15MT1162.7 - 5.5Z64-2Automotive (-40° to +105C)
AT90CAN128-15MZ162.7 - 5.5Z64-2Automotive (-40° to +125°C)
(1)
Speed (MHz
(4)
)Power Supply (V)Package
(2)(3)
Operation Range
Notes:1. These devices can also be supplied in wafer form. Please contact your local Atmel sales office for detailed ordering informa-