Difference between revisions of "AVR External Interrupts"
Line 16: | Line 16: | ||
==General Interrupt Flag Register(GIFR)== | ==General Interrupt Flag Register(GIFR)== | ||
==MCU Control Register (MCUCR)== | ==MCU Control Register (MCUCR)== | ||
− | + | {| class="table table-bordered" | |
+ | |- | ||
+ | ! Header text !! Header text | ||
+ | |-class="success" | ||
+ | | Example || Example | ||
+ | |- | ||
+ | | Example || Example | ||
+ | |} | ||
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. | 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= | =Hook Up= | ||
=The Code= | =The Code= | ||
=Downloads= | =Downloads= |
Revision as of 15:19, 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:
Contents
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)
Header text | Header text |
---|---|
Example | Example |
Example | Example |
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.