Datasheet

0x0C03 out SPL,r16
0x0C04 sei ; Enable interrupts
0x0C05 <instr> xxx
When the BOOTRST Fuse is programmed, the Boot section size set to 2K bytes and the MCUCR.IVSEL
is set before any interrupts are enabled, the most typical and general program setup for the Reset and
Interrupt Vector Addresses is:
Address Labels Code Comments
;
.org 0x0C00
0x0C00 jmp RESET ; Reset handler
0x0C01 jmp EXT_INT0 ; IRQ0 Handler
0x0C02 jmp EXT_INT1 ; IRQ1 Handler
... ... ... ;
0x0C19 jmp SPM_RDY ; SPM Ready Handler
;
0x0C1A RESET: ldi r16,high(RAMEND) ; Main program start
0x0C1B out SPH,r16 ; Set Stack Pointer to top of RAM
0x0C1C ldi r16,low(RAMEND)
0x0C1D out SPL,r16
0x0C1E sei ; Enable interrupts
0x0C1F <instr> xxx
16.3 Interrupt Vectors in ATmega168PA
Table 16-4. Reset and Interrupt Vectors in ATmega168PA
Vector No
Program Address
(2)
Source Interrupts definition
1 0x0000
(1)
RESET External Pin, Power-on Reset, Brown-out Reset and Watchdog System
Reset
2 0x0002 INT0 External Interrupt Request 0
3 0x0004 INT1 External Interrupt Request 0
4 0x0006 PCINT0 Pin Change Interrupt Request 0
5 0x0008 PCINT1 Pin Change Interrupt Request 1
6 0x000A PCINT2 Pin Change Interrupt Request 2
7 0x000C WDT Watchdog Time-out Interrupt
8 0x000E TIMER2_COMPA Timer/Counter2 Compare Match A
9 0x0010 TIMER2_COMPB Timer/Coutner2 Compare Match B
10 0x0012 TIMER2_OVF Timer/Counter2 Overflow
11 0x0014 TIMER1_CAPT Timer/Counter1 Capture Event
12 0x0016 TIMER1_COMPA Timer/Counter1 Compare Match A
13 0x0018 TIMER1_COMPB Timer/Coutner1 Compare Match B
14 0x001A TIMER1_OVF Timer/Counter1 Overflow
15 0x001C TIMER0_COMPA Timer/Counter0 Compare Match A
16 0x001E TIMER0_COMPB Timer/Coutner0 Compare Match B
17 0x0020 TIMER0_OVF Timer/Counter0 Overflow
18 0x0022 SPI STC SPI Serial Transfer Complete
ATmega48PA/88PA/168PA
Interrupts
© 2018 Microchip Technology Inc.
Datasheet Complete
DS40002011A-page 92