17.1 Interrupt Vectors in ATmega48PB

Table 17-1. Reset and Interrupt Vectors in ATmega48PB
Vector No.Program AddressSourceInterrupt Definition
10x000RESETExternal Pin, Power-on Reset, Brown-out Reset and Watchdog System Reset
20x001INT0External Interrupt Request 0
30x002INT1External Interrupt Request 1
40x003PCINT0Pin Change Interrupt Request 0
50x004PCINT1Pin Change Interrupt Request 1
60x005PCINT2Pin Change Interrupt Request 2
70x006WDTWatchdog Time-out Interrupt
80x007TIMER2 COMPATimer/Counter2 Compare Match A
90x008TIMER2 COMPBTimer/Counter2 Compare Match B
100x009TIMER2 OVFTimer/Counter2 Overflow
110x00ATIMER1 CAPTTimer/Counter1 Capture Event
120x00BTIMER1 COMPATimer/Counter1 Compare Match A
130x00CTIMER1 COMPBTimer/Coutner1 Compare Match B
140x00DTIMER1 OVFTimer/Counter1 Overflow
150x00ETIMER0 COMPATimer/Counter0 Compare Match A
160x00FTIMER0 COMPBTimer/Counter0 Compare Match B
170x010TIMER0 OVFTimer/Counter0 Overflow
180x011SPI, STCSPI Serial Transfer Complete
190x012USART, RXUSART Rx Complete
200x013USART, UDREUSART, Data Register Empty
210x014USART, TXUSART, Tx Complete
220x015ADCADC Conversion Complete
230x016EE READYEEPROM Ready
240x017ANALOG COMPAnalog Comparator
250x018TWI2-wire Serial Interface (I²C)
260x019SPM READYStore Program Memory Ready
270x01AUSART, STARTUSART Start Edge Interrupt

The most typical and general program setup for the Reset and Interrupt Vector Addresses in ATmega48PB is:

AddressLabelsCode Comments
0x000rjmpRESET; Reset Handler
0x001rjmpEXT_INT0; IRQ0 Handler
0x002rjmpEXT_INT1; IRQ1 Handler
0x003rjmpPCINT0; PCINT0 Handler
0x004rjmpPCINT1; PCINT1 Handler
0x005rjmpPCINT2; PCINT2 Handler
0x006rjmpWDT; Watchdog Timer Handler
0x007rjmpTIM2_COMPA; Timer2 Compare A Handler
0x008rjmpTIM2_COMPB; Timer2 Compare B Handler
0x009rjmpTIM2_OVF; Timer2 Overflow Handler
0x00ArjmpTIM1_CAPT; Timer1 Capture Handler
0x00BrjmpTIM1_COMPA; Timer1 Compare A Handler
0x00CrjmpTIM1_COMPB; Timer1 Compare B Handler
0x00DrjmpTIM1_OVF; Timer1 Overflow Handler
0x00ErjmpTIM0_COMPA; Timer0 Compare A Handler
0x00FrjmpTIM0_COMPB; Timer0 Compare B Handler
0x010rjmpTIM0_OVF; Timer0 Overflow Handler
0x011rjmpSPI_STC; SPI Transfer Complete Handler
0x012rjmpUSART_RXC; USART, RX Complete Handler
0x013rjmpUSART_UDRE; USART, UDR Empty Handler
0x014rjmpUSART_TXC; USART, TX Complete Handler
0x015rjmpADC; ADC Conversion Complete Handler
0x016rjmpEE_RDY; EEPROM Ready Handler
0x017rjmpANA_COMP; Analog Comparator Handler
0x018rjmpTWI; 2-wire Serial Interface Handler
0x019rjmpSPM_RDY; Store Program Memory Ready Handler
;
0x01ARESET: ldir16, high(RAMEND); Main program start
0x01BoutSPH,r16; Set Stack Pointer to top of RAM
0x01Cldir16, low(RAMEND)
0x01DoutSPL, r16
0x01Esei; Enable interrupts
0x01F<instr>xxx
............