Interrupts, Interrupt vectors in atmega32, Atmega32(l) – Rainbow Electronics ATmega32L User Manual

Page 42

Advertising
background image

42

ATmega32(L)

2503C–AVR–10/02

Interrupts

This section describes the specifics of the interrupt handling as performed in
ATmega32. For a general explanation of the AVR interrupt handling, refer to “Reset and
Interrupt Handling” on page 11.

Interrupt Vectors in
ATmega32

Notes:

1. When the BOOTRST fuse is programmed, the device will jump to the Boot Loader

address at reset, see “Boot Loader Support – Read-While-Write Self-Programming”
on page 242.

2. When the IVSEL bit in GICR is set, interrupt vectors will be moved to the start of the

Boot Flash section. The address of each Interrupt Vector will then be the address in
this table added to the start address of the Boot Flash section.

Table 19 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 18. Reset and Interrupt Vectors

Vector No.

Program

Address

(2)

Source

Interrupt Definition

1

$000

(1)

RESET

External Pin, Power-on Reset, Brown-out
Reset, Watchdog Reset, and JTAG AVR
Reset

2

$002

INT0

External Interrupt Request 0

3

$004

INT1

External Interrupt Request 1

4

$006

INT2

External Interrupt Request 2

5

$008

TIMER2 COMP

Timer/Counter2 Compare Match

6

$00A

TIMER2 OVF

Timer/Counter2 Overflow

7

$00C

TIMER1 CAPT

Timer/Counter1 Capture Event

8

$00E

TIMER1 COMPA

Timer/Counter1 Compare Match A

9

$010

TIMER1 COMPB

Timer/Counter1 Compare Match B

10

$012

TIMER1 OVF

Timer/Counter1 Overflow

11

$014

TIMER0 COMP

Timer/Counter0 Compare Match

12

$016

TIMER0 OVF

Timer/Counter0 Overflow

13

$018

SPI, STC

Serial Transfer Complete

14

$01A

USART, RXC

USART, Rx Complete

15

$01C

USART, UDRE

USART Data Register Empty

16

$01E

USART, TXC

USART, Tx Complete

17

$020

ADC

ADC Conversion Complete

18

$022

EE_RDY

EEPROM Ready

19

$024

ANA_COMP

Analog Comparator

20

$026

TWI

Two-wire Serial Interface

21

$028

SPM_RDY

Store Program Memory Ready

Advertising