ATmega64A
Table 11-1. Reset and Interrupt Vectors (Continued)
Vector
No.
Program
Address(2)
Source
Interrupt Definition
27
28
29
30
31
32
33
34
35
0x0034(3)
0x0036(3)
0x0038(3)
0x003A(3)
0x003C(3)
0x003E(3)
0x0040(3)
0x0042(3)
0x0044(3)
TIMER3 COMPA
TIMER3 COMPB
TIMER3 COMPC
TIMER3 OVF
USART1, RX
USART1, UDRE
USART1, TX
TWI
Timer/Counter3 Compare Match A
Timer/Counter3 Compare Match B
Timer/Counter3 Compare Match C
Timer/Counter3 Overflow
USART1, Rx Complete
USART1 Data Register Empty
USART1, Tx Complete
Two-wire Serial Interface
SPM READY
Store Program Memory Ready
Notes: 1. When the BOOTRST Fuse is programmed, the device will jump to the Boot Loader address at
reset, see “Boot Loader Support – Read-While-Write Self-programming” on page 281.
2. When the IVSEL bit in MCUCR is set, Interrupt Vectors will be moved to the start of the Boot
Flash section. The address of each Interrupt Vector will then be address in this table added to
the start address of the Boot Flash section.
3. The Interrupts on address 0x0030 - 0x0044 do not exist in ATmega103 compatibility mode.
Table 11-2 shows Reset and Interrupt Vectors placement for the various combinations of
BOOTRST and IVSEL settings. If the program never enables an interrupt source, the Interrupt
Vectors are not used, and regular program code can be placed at these locations. This is also
the case if the Reset Vector is in the Application section while the Interrupt Vectors are in the
Boot section or vice versa.
Table 11-2. Reset and Interrupt Vectors Placement(1)
BOOTRST
IVSEL
Reset Address
0x0000
Interrupt Vectors Start Address
0x0002
1
1
0
0
0
1
0
1
0x0000
Boot Reset Address + 0x0002
0x0002
Boot Reset Address
Boot Reset Address
Boot Reset Address + 0x0002
Note:
1. The Boot Reset Address is shown in Table 26-6 on page 292. For the BOOTRST Fuse “1”
means unprogrammed while “0” means programmed.
The most typical and general program setup for the Reset and Interrupt Vector Addresses in
ATmega64A is:
AddressLabels Code
Comments
0x0000
0x0002
0x0004
0x0006
0x0008
0x000A
0x000C
0x000E
0x0010
jmp
jmp
jmp
jmp
jmp
jmp
jmp
jmp
jmp
RESET
; Reset Handler
; IRQ0 Handler
; IRQ1 Handler
; IRQ2 Handler
; IRQ3 Handler
; IRQ4 Handler
; IRQ5 Handler
; IRQ6 Handler
; IRQ7 Handler
EXT_INT0
EXT_INT1
EXT_INT2
EXT_INT3
EXT_INT4
EXT_INT5
EXT_INT6
EXT_INT7
61
8160C–AVR–07/09