Line 7: Line 7:
 
=The Registers=
 
=The Registers=
 
==General Interrupt Control Register (GICR)==
 
==General Interrupt Control Register (GICR)==
 +
{| class="table table-responsive table-striped"
 +
|-
 +
! 7!!6!!5!!4!!3!!2!!1!!0
 +
|-
 +
| '''INT1'''||'''INT0'''|| '''INT2'''|| -|| -|| -|| IVSEL|| IVCE
 +
|}
 +
 
==General Interrupt Flag Register(GIFR)==
 
==General Interrupt Flag Register(GIFR)==
 
==MCU Control Register (MCUCR)==  
 
==MCU Control Register (MCUCR)==  

Revision as of 15:12, 19 March 2016

We have looked at the basics of AVR Interrupts, now let us go ahead and use the External Interrupts feature on the AVR MCUs.

Steps to configure the Interrupts:


The Registers

General Interrupt Control Register (GICR)

7 6 5 4 3 2 1 0
INT1 INT0 INT2 - - - IVSEL IVCE

General Interrupt Flag Register(GIFR)

MCU Control Register (MCUCR)

We will connect two switches to the two interrupt pins and show the status on a LCD. The connections are shown in the image below.

Hook Up

The Code

Downloads