ATMEGA325-16AJ ATMEL [ATMEL Corporation], ATMEGA325-16AJ Datasheet - Page 48

no-image

ATMEGA325-16AJ

Manufacturer Part Number
ATMEGA325-16AJ
Description
8-bit Microcontroller with In-System Programmable Flash
Manufacturer
ATMEL [ATMEL Corporation]
Datasheet
48
ATmega325/3250/645/6450
Table 23 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 loca-
tions. 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 23. Reset and Interrupt Vectors Placement
Note:
The most typical and general program setup for the Reset and Interrupt Vector
Addresses in ATmega325/3250/645/6450 is:
Address
0x0000
0x0002
0x0004
0x0006
0x0008
0x000A
0x000C
0x000E
0x0010
0x0012
0x0014
0x0016
0X0018
0x001A
0x001C
0x001E
0x0020
0x0022
0x0024
0x0026
0x0028
0x002A
0x002C
0x002E
0x0030
;
0x0032
0x0033
0x0034
0x0035
0x0036
0x0037
BOOTRST
1
1
0
0
1. The Boot Reset Address is shown in Table 104 on page 254. For the BOOTRST
Fuse “1” means unprogrammed while “0” means programmed.
Labels
RESET:
...
IVSEL
0
1
0
1
Code
jmp
jmp
jmp
jmp
jmp
jmp
jmp
jmp
jmp
jmp
jmp
jmp
jmp
jmp
jmp
jmp
jmp
jmp
jmp
jmp
jmp
jmp
jmp
jmp
ldi
out
ldi
out
sei
<instr> xxx
...
Reset Address
0x0000
0x0000
Boot Reset Address
Boot Reset Address
RESET
EXT_INT0
PCINT0
PCINT1
TIM2_COMP
TIM2_OVF
TIM1_CAPT
TIM1_COMPA
TIM1_COMPB
TIM1_OVF
TIM0_COMP
TIM0_OVF
SPI_STC
USART_RXC
USART_UDRE
USART_TXC
USI_STRT
USI_OVF
ANA_COMP
ADC
EE_RDY
SPM_RDY
;NOT_USED
PCINT2
PCINT3
r16, high(RAMEND)
SPH,r16
r16, low(RAMEND)
SPL,r16
...
(1)
Interrupt Vectors Start Address
0x0002
Boot Reset Address + 0x0002
0x0002
Boot Reset Address + 0x0002
Comments
; Reset Handler
; IRQ0 Handler
; PCINT0 Handler
; PCINT1 Handler
; Timer2 Compare Handler
; Timer2 Overflow Handler
; Timer1 Capture Handler
; Timer1 CompareA Handler
; Timer1 CompareB Handler
; Timer1 Overflow Handler
; Timer0 Compare Handler
; Timer0 Overflow Handler
; SPI Transfer Complete Handler
; USART RX Complete Handler
; USART,UDR Empty Handler
; USART TX Complete Handler
; USI Start Condition Handler
; USI Overflow Handler
; Analog Comparator Handler
; ADC Conversion Complete Handler
; EEPROM Ready Handler
; SPM Ready Handler
; RESERVED
; PCINT2 Handler
; PCINT3 Handler
; Main program start
; Set Stack Pointer to top of RAM
; Enable interrupts
2570A–AVR–09/04

Related parts for ATMEGA325-16AJ