5.3. External Interrupt
In this experiment External Interrupt 0 is enabled and set up to respond
to 1-to-0 transitions. When an Interrupt is received, Buzzer is on,
and buzzer is off when no interrupt recived.
Figure 5.3.1. External Interrupt Application
Build the circuit as shown in figure 5.3.1. As you seen on figure 5.3.1.
P0 is connected to buzzer. Remember, that all we want to do with this
lesson is get buzzer on when interrupt is received.
In this step, you must tipe the assembly program to make your Interrupt
get action, we assume that you have already known the editor, we used
MIDE-51 to edit the program. ( Download File
: exp53.zip )
Loop: setb P0.0
Setb IT0 ;negatif transition
Setb EX0 ;External Interrupt Enable
Setb EA ;Master Interrupt Enable
Safe your assembly program above, and name it with int4.asm (for example)
Compile the program that you have been save by using MIDE-51, see the
Download your hex file ( int4.hex ) into the microcontroller
by using Microcontroller ATMEL ISP software, see the instruction.After
download this hex file you'll see the action of Interruption( of course
if your cable connection and your program are corrected ).
questions and discussion about this topic