Path: Home => AVR overview => Interrupt programming => Interrupt sources
Interrupt AVR assembler tutorial logo

Interrupt sources in AVR assembler


Here, the different sources for interrupts are described.

Sources of interrupts

In general:

Types of hardware interrupts

In the following table a small n means a counting digit, always starting with zero. Note that the names of the interrupts in the handbooks are not always systematic and vary sometimes, the abbreviations for interrupts used here are inofficial and not identical with the original.

The following table lists the main sources for interrupts. Listed is the internal hardware, the event that can generate an interrupt, additional information on that, the availability of this interrupt type and the name, under which the interrupt can be found in the following table below.
Hardware Interrupt when ... Additional information Availability Name(s)
External interrupts Level canges on a certain pin (INTn) Selectable if each level change or only rising or falling level changes generate an interrupt (ISC-Bits). INT0 in all AVRs
several have INT1
a few INT2
INTn
Port change interrupts Level change on a portpin (PCIn) The active pins can be selected with a port mask (one's enable the pin's interrupt) in many
Tiny/Mega
PCIn
Timer interrupts Overflow Timer exceeds its maximum value and restarts at zero; in 8-bit timers 256, in 16-bit timers 65,536, not used in CTC modes if the compare value is set to different values all timers/counters TCnO
Single compare
value
in timers with only one compare value: match with compare value has occurred during last timer change only few timers/counters TCnC
Compare values A, B and/or C in timers with several compare values: match with compare values has occurred during last timer change A,B: many
C: only a few
TCnA...
TCnC
Capture value in timers in capture mode: counted pulses reached capture value many TCnP
UART Character
received
a complete character has been received and has been copied to the receiver's input buffer many UnRX
Transmit register
available
the transmit character has been transferred to the transmit buffer, the next transmit character can be written many UnUD
Transmit
complete
the last character has been completely sent, tranmit buffer empty many UnTX
EEPROM EEPROM
ready
Write process to EEPROM completed, the next write command can start nearly
all
EERY
ADC Conversion
complete
the conversion of the input voltage is complete, the result is available in the data register all
with an ADC
ADC
Analog
comparator
Compare
change
depending from the ACIS bits an interrupt at each change or only rising or falling changes occurs all ANA
ANAn
Additional (diverse)
(further interrupt types see the handbook) several  
Each of these interrupts can be enabled by software, and disabled as well, during program execution. The default is that none of the interrupts is enabled.

To the top of that page

Interrupts in AVR types with single-word jump instructions

Caused by the different size of the AVR types in respect to flash memory the interrupt jump list either has single-word RJMP or double-word JMP jumps. AVR types with small flash do not need JMP instructions and occupy only one word address per jump. Each program word in the jump list is one interrupt type.

In the following table all AVR types with single-instruction jumps are listed. The addresses of each interrupt jump are given by the column header. The more left the interrupt is located the higher is its priority. Empty entries signal that this address is not associated to an interrupt.
Type/Addr0000000100020003000400050006000700080009000A000B000C000D000E000F00100011001200130014
AT90S1200RESINT0TC0OANA                 
AT90S2313RESINT0INT1TC1PTC1CTC1OTC0OU0RXU0UDU0TXANA          
AT90S2323RESINT0TC0O                  
AT90S2343RESINT0TC0O                  
AT90S4433RESINT0INT1TC1PTC1CTC1OTC0OSPISU0RXU0UDU0TXADCEERYANA       
AT90S4434RESINT0INT1TC2CTC2OTC1PTC1ATC1BTC1OTC0OSPISU0RXU0UDU0TXADCEERYANA    
AT90S8515RESINT0INT1TC1PTC1ATC1BTC1OTC0OSPISU0RXU0UDU0TXANA        
AT90S8535RESINT0INT1TC2CTC2OTC1PTC1ATC1BTC1OTC0OSPISU0RXU0UDU0TXADCEERYANA    
ATmega8RESINT0INT1TC2CTC2OTC1PTC1ATC1BTC1OTC0OSPISU0RXU0UDU0TXADCEERYANATWISPMR  
ATmega8515RESINT0INT1TC1PTC1ATC1BTC1OTC0OSPISU0RXU0UDU0TXANAINT2TC0CEERYSPMR    
ATmega8535RESINT0INT1TC2CTC2OTC1PTC1ATC1BTC1OTC0OSPISU0RXU0UDU0TXADCEERYANATWIINT2TC0CSPMR
ATtiny11RESINT0PCI0                  
ATtiny12RESINT0PCI0                  
ATtiny13RESINT0PCI0TC0OEERYANATC0ATC0BWDTADC           
ATtiny15LRESINT0PCI0TC1ATC1OTC0OEERYANAADC            
ATtiny22RESINT0TC0O                  
ATtiny24RESINT0PCI0PCI1WDTTC1PTC1ATC1BTC1OTC0ATC0BTC0OANAADCEERYUSISUSIO    
ATtiny25RESINT0PCI0TC1ATC1OTC0OEERYANAADCTC1BTC0ATC0BWDTUSISUSIO      
ATtiny26RESINT0PCI0TC1ATC1BTC1OTC0OUSISUSIOEERYANAADC         
ATtiny28RESINT0INT1PCI0TC0OANA               
ATtiny44RESINT0PCI0PCI1WDTTC1PTC1ATC1BTC1OTC0ATC0BTC0OANAADCEERYUSISUSIO    
ATtiny45RESINT0PCI0TC1ATC1OTC0OEERYANAADCTC1BTC0ATC0BWDTUSISUSIO      
ATtiny84RESINT0PCI0PCI1WDTTC1PTC1ATC1BTC1OTC0ATC0BTC0OANAADCEERYUSISUSIO    
ATtiny85RESINT0PCI0TC1ATC1OTC0OEERYANAADCTC1BTC0ATC0BWDTUSISUSIO      
ATtiny261RESINT0PCI0TC1ATC1BTC1OTC0OUSISUSIOEERYANAADCWDTINT1TC0ATC0BTC0PTC1DFAUL  
ATtiny461RESINT0PCI0TC1ATC1BTC1OTC0OUSISUSIOEERYANAADCWDTINT1TC0ATC0BTC0PTC1DFAUL  
ATtiny861RESINT0PCI0TC1ATC1BTC1OTC0OUSISUSIOEERYANAADCWDTINT1TC0ATC0BTC0PTC1DFAUL  
ATtiny2313RESINT0INT1TC1PTC1ATC1OTC0OU0RXU0UDU0TXANAPCI0TC1BTC0ATC0BUSISUSIOEERYWDTO  
You can see that To the top of that page

Interrupts in AVR types with double-word jumps

If the AVR type has a larger memory, parts of the program space can not be accessed with RJMP instructions. Those use two-word JMP instructions instead.

The following table lists the interrupts and their addresses in those AVR types. As the number of interrupts is larger, the first table displays only the first 16 vectors.
AVR type/Addr00000002000400060008000A000C000E00100012001400160018001A001C001E
AT90CAN32RESINT0INT1INT2INT3INT4INT5INT6INT7TC2CTC2OTC1PTC1ATC1BTC1CTC1O
AT90CAN64RESINT0INT1INT2INT3INT4INT5INT6INT7TC2CTC2OTC1PTC1ATC1BTC1CTC1O
AT90CAN128RESINT0INT1INT2INT3INT4INT5INT6INT7TC2CTC2OTC1PTC1ATC1BTC1CTC1O
ATmega16RESINT0INT1TC2CTC2OTC1PTC1ATC1BTC1OTC0OSPISU0RXU0UDU0TXADCEERY
ATmega32RESINT0INT1INT2TC2CTC2OTC1PTC1ATC1BTC1OTC0CTC0OSPISU0RXU0UDU0TX
ATmega48RESINT0INT1PCI0PCI1PCI2WDTTC2ATC2BTC2OTC1PTC1ATC1BTC1OTC0ATC0B
ATmega64RESINT0INT1INT2INT3INT4INT5INT6INT7TC2CTC2OTC1PTC1ATC1BTC1OTC0C
ATmega88RESINT0INT1PCI0PCI1PCI2WDTTC2ATC2BTC2OTC1PTC1ATC1BTC1OTC0ATC0B
ATmega103RESINT0INT1INT2INT3INT4INT5INT6INT7TC2CTC2OTC1PTC1ATC1BTC1OTC0C
ATmega128RESINT0INT1INT2INT3INT4INT5INT6INT7TC2CTC2OTC1PTC1ATC1BTC1OTC0C
ATmega161RESINT0INT1INT2TC2CTC2OTC1PTC1ATC1BTC1OTC0CTC0OSPISU0RXU1RXU0UD
ATmega162RESINT0INT1INT2PCI0PCI1TC3PTC3ATC3BTC3OTC2CTC2OTC1PTC1ATC1BTC1O
ATmega163RESINT0INT1TC2CTC2OTC1PTC1ATC1BTC1OTC0OSPISU0RXU0UDU0TXADCEERY
ATmega164RESINT0INT1INT2PCI0PCI1PCI2PCI3WDTTC2ATC2BTC2OTC1PTC1ATC1BTC1O
ATmega165RESINT0PCI0PCI1TC2CTC2OTC1PTC1ATC1BTC1OTC0CTC0OSPISU0RXU0UDU0TX
ATmega168RESINT0INT1PCI0PCI1PCI2WDTTC2ATC2BTC2OTC1PTC1ATC1BTC1OTC0ATC0B
ATmega169RESINT0PCI0PCI1TC2CTC2OTC1PTC1ATC1BTC1OTC0CTC0OSPISU0RXU0UDU0TX
ATmega323RESINT0INT1INT2TC2CTC20TC1PTC1ATC1BTC1OTC0CTC0OSPISU0RXU0UDU0TX
ATmega324RESINT0INT1INT2PCI0PCI1PCI2PCI3WDTTC2ATC2BTC2OTC1PTC1ATC1BTC1O
ATmega325RESINT0PCI0PCI1TC2CTC2OTC1PTC1ATC1BTC1OTC0CTC0OSPISU0RXU0UDU0TX
ATmega329RESINT0PCI0PCI1TC2CTC2OTC1PTC1ATC1BTC1OTC0CTC0OSPISU0RXU0UDU0TX
ATmega406RESBATIINT0INT1INT2INT3PCI0PCI1WDTWAKETC1CTC1OTC0ATC0BTC0OTWBU
ATmega640RESINT0INT1INT2INT3INT4INT5INT6INT7PCI0PCI1PCI2WDTTC2ATC2BTC2O
ATmega644RESINT0INT1INT2PCI0PCI1PCI2PCI3WDTTC2ATC2BTC2OTC1PTC1ATC1BTC1O
ATmega645RESINT0PCI0PCI1TC2CTC2OTC1PTC1ATC1BTC1OTC0CTC0OSPISU0RXU0UDU0TX
ATmega649RESINT0PCI0PCI1TC2CTC2OTC1PTC1ATC1BTC1OTC0CTC0OSPISU0RXU0UDU0TX
ATmega1280RESINT0INT1INT2INT3INT4INT5INT6INT7PCI0PCI1PCI2WDTTC2ATC2BTC2O
ATmega1281RESINT0INT1INT2INT3INT4INT5INT6INT7PCI0PCI1PCI2WDTTC2ATC2BTC2O
ATmega2560RESINT0INT1INT2INT3INT4INT5INT6INT7PCI0PCI1PCI2WDTTC2ATC2BTC2O
ATmega2561RESINT0INT1INT2INT3INT4INT5INT6INT7PCI0PCI1PCI2WDTTC2ATC2BTC2O
ATmega3250RESINT0PCI0PCI1TC2CTC2OTC1PTC1ATC1BTC1OTC0CTC0OSPISU0RXU0UDU0TX
ATmega3290RESINT0PCI0PCI1TC2CTC2OTC1PTC1ATC1BTC1OTC0CTC0OSPISU0RXU0UDU0TX
ATmega6450RESINT0PCI0PCI1TC2CTC2OTC1PTC1ATC1BTC1OTC0CTC0OSPISU0RXU0UDU0TX
ATmega6490RESINT0PCI0PCI1TC2CTC2OTC1PTC1ATC1BTC1OTC0CTC0OSPISU0RXU0UDU0TX


To the top of that page

The interrupts with vectors between von 0020 and 003E:
AVR type/Addr00200022002400260028002A002C002E00300032003400360038003A003C003E
AT90CAN32TC0CTC0OCANIOVRISPISU0RXU0UDU0TXANACADCEERYTC3PTC3ATC3BTC3CTC3O
AT90CAN64TC0CTC0OCANIOVRISPISU0RXU0UDU0TXANACADCEERYTC3PTC3ATC3BTC3CTC3O
AT90CAN128TC0CTC0OCANIOVRISPISU0RXU0UDU0TXANACADCEERYTC3PTC3ATC3BTC3CTC3O
ATmega16ANATWIINT2TC0CSPMR           
ATmega32ADCEERYANATWISPMR           
ATmega48TC0OSPISU0RXU0UDU0TXADCEERYANATWISPMR      
ATmega64TC0OSPISU0RXU0UDU0TXADCEERYANATC1CTC3PTC3ATC3BTC3CTC3OU1RXU1UD
ATmega88TC0OSPISU0RXU0UDU0TXADCEERYANATWISPMR      
ATmega103TC0OSPISU0RXU0UDU0TXADCEERYANA        
ATmega128TC0OSPISU0TXU0UDU0TXADCEERYANATC1CTC3PTC3ATC3BTC3CTC3OU1RXU1UD
ATmega161U1UDU0TXU1TXEERYANA           
ATmega162TC0CTC0OSPISU0RXU1RXU0UDU1UDU0TXU1TXEERYANASPMR    
ATmega163ANATWI              
ATmega164TC0ATC0BTC0OSPISU0RXU0UDU0TXANAADCEERYTWI     
ATmega165USISUSIOANAADCEERYSPMR          
ATmega168TC0OSPISU0RXU0UDU0TXADCEERYANATWISPMR      
ATmega169USISUSIOANAADCEERYSPMRLCD         
ATmega323ADCEERYANATWSI            
ATmega324TC0ATC0BTC0OSPISU0RXU0UDU0TXANAADCEERYTWI     
ATmega325USISUSIOANAADCEERYSPMR          
ATmega329USISUSIOANAADCEERYSPMRLCD         
ATmega406TWIVADCCADCCADREERYSPMR          
ATmega640TC1PTC1ATC1BTC1CTC1OTC0ATC0BTC0OSPISU0RXU0UDU0TXANAADCEERYTC3P
ATmega644TC0ATC0BTC0OSPISU0RXU0UDU0TXANAADCEERYTWI     
ATmega645USISUSIOANAADCEERYSPMR          
ATmega649USISUSIOANAADCEERYSPMRLCD         
ATmega1280TC1PTC1ATC1BTC1CTC1OTC0ATC0BTC0OSPISU0RXU0UDU0TXANAADCEERYTC3P
ATmega1281TC1PTC1ATC1BTC1CTC1OTC0ATC0BTC0OSPISU0TXU0UDU0TXANAADCEERYTC3P
ATmega2560TC1PTC1ATC1BTC1CTC1OTC0ATC0BTC0OSPISU0RXU0UDU0TXANAADCEERYTC3P
ATmega2561TC1PTC1ATC1BTC1CTC1OTC0ATC0BTC0OSPISU0TXU0UDU0TXANAADCEERYTC3P
ATmega3250USISUSIOANAADCEERYSPMR PCI2PCI3       
ATmega3290USISUSIOANAADCEERYSPMRLCDPCI2PCI3       
ATmega6450USISUSIOANAADCEERYSPMR PCI2PCI3       
ATmega6490USISUSIOANAADCEERYSPMRLCDPCI2PCI2       


To the top of that page

Vectors with addresses 0040 to 005F:
AVR type/Addr00400042004400460048004A004C004E00500052005400560058005A005C005E
AT90CAN32U1RXU1UDU1TXTWISPMR           
AT90CAN64U1RXU1UDU1TXTWISPMR           
AT90CAN128U1RXU1UDU1TXTWISPMR           
ATmega64U1TXTWISPMR             
ATmega128U1TXTWISPMR             
ATmega1280TC3ATC3BTC3CTC3OU1RXU1UDU1TXTWISPMRTC4PTC4ATC4BTC4CTC4OTC5PTC5A
ATmega1281TC3ATC3BTC3CTC3OU1RXU1UDU1TXTWISPMRTC4PTC4ATC4BTC4CTC4OTC5PTC5A
ATmega2560TC3ATC3BTC3CTC3OU1RXU1UDU1TXTWISPMRTC4PTC4ATC4BTC4CTC4OTC5PTC5A
ATmega2561TC3ATC3BTC3CTC3OU1RXU1UDU1TXTWISPMRTC4PTC4ATC4BTC4CTC4OTC5PTC5A


Vectors with addresses 0060 to 0070:
AVR-Typ/Adr00600062006400660068006A006C006E0070
ATmega1280TC5BTC5CTC5OU2RXU2UDU2TXU3RXU3UDU3TX
ATmega1281TC5BTC5CTC5O      
ATmega2560TC5BTC5CTC5OU2RXU2UDU2TXU3RXU3UDU3TX
ATmega2561TC5BTC5CTC5O      


To the top of that page

©2009-2019 by http://www.avr-asm-tutorial.net