Datasheet

Note:  1. 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 is:
Address Labels Code Comments
0x0000 jmp RESET ; Reset
0x0001 jmp INT0 ; IRQ0
0x0002 jmp INT1 ; IRQ1
0x0003 jmp PCINT0 ; PCINT0
0x0004 jmp PCINT1 ; PCINT1
0x0005 jmp PCINT2 ; PCINT2
0x0006 jmp WDT ; Watchdog Timeout
0x0007 jmp TIM2_COMPA ; Timer2 CompareA
0x0008 jmp TIM2_COMPB ; Timer2 CompareB
0x0009 jmp TIM2_OVF ; Timer2 Overflow
0x000A jmp TIM1_CAPT ; Timer1 Capture
0x000B jmp TIM1_COMPA ; Timer1 CompareA
0x000C jmp TIM1_COMPB ; Timer1 CompareB
0x000C jmp TIM1_OVF ; Timer1 Overflow
0x000E jmp TIM0_COMPA ; Timer0 CompareA
0x000F jmp TIM0_COMPB ; Timer0 CompareB
0x0010 jmp TIM0_OVF ; Timer0 Overflow
0x0011 jmp SPI_STC ; SPI Transfer Complete
0x0012 jmp USART_RXC ; USART RX Complete
0x0013 jmp USART_UDRE ; USART UDR Empty
0x0014 jmp USART_TXC ; USART TX Complete
0x0015 jmp ADC ; ADC Conversion Complete
0x0016 jmp EE_RDY ; EEPROM Ready
0x0017 jmp ANA_COMP ; Analog Comparator
0x0018 jmp TWI ; 2-wire Serial
0x0019 jmp SPM_RDY ; SPM Ready
;
0x001A RESET: ldi r16,high(RAMEND) ; Main program start
0x001B out SPH,r16 ; Set Stack Pointer to top of RAM
0x001C ldi r16,low(RAMEND)
0x001D out SPL,r16
0x001E sei ; Enable interrupts
0x001F <instr> xxx
... ... ... ...
When the BOOTRST Fuse is unprogrammed, the Boot section size set to 2Kbytes 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
0x000 RESET: ldi r16,high(RAMEND) ; Main program start
0x001 out SPH,r16 ; Set Stack Pointer to top of RAM
0x002 ldi r16,low(RAMEND)
0x0003 out SPL,r16
0x0004 sei ; Enable interrupts
0x0005 <instr> xxx
;
.org 0xC01
0x0C01 jmp EXT_INT0 ; IRQ0 Handler
0x0C02 jmp EXT_INT1 ; IRQ1 Handler
... ... ... ;
0x0C19 jmp SPM_RDY ; SPM Ready Handler
When the BOOTRST Fuse is programmed and the Boot section size set to 2Kbytes, the most typical and
general program setup for the Reset and Interrupt Vector Addresses is:
Address Labels Code Comments
.org 0x0002
0x0002 jmp EXT_INT0 ; IRQ0 Handler
0x0004 jmp EXT_INT1 ; IRQ1 Handler
... ... ... ;
0x0032 jmp SPM_RDY ; SPM Ready Handler
;
.org 0xC00
0x0C00 RESET: ldi r16,high(RAMEND) ; Main program start
0x0C01 out SPH,r16 ; Set Stack Pointer to top of RAM
0x0C02 ldi r16,low(RAMEND)
ATmega48PA/88PA/168PA
Interrupts
© 2018 Microchip Technology Inc.
Datasheet Complete
DS40002011A-page 91