BM Dept., Govt. Engg. College, Gandhinagar Page 29
EXPERIMENT NO. 7
Aim: Generate external interrupt INT0 and INT1 by connecting push button switch. Glow LEDs
connected at port P1 one by one when interrupt INT0 occurs. LEDs should flash when interrupt
INT1 occurs.
Circuit Diagram:
Program:
org 00h
ajmp start
org 03h ; Vector location for External interrupt INT0
ajmp sequence ; Jump to sequence program
reti
org 13h ; Vector location for External interrupt INT1
ajmp flash ; Jump to flash program
reti
start: mov IE,#10000101B ;Enable External interrupts
setb IT1 ; Negative edge trigger for INT1
setb IT0 ; Negative edge trigger for INT0
mov P1,#00h ; Port P1 output port
flash: mov P1,#0ffh ; Make all LEDs OFF
acall delay
mov P1,#00h ; Make all LEDs ON
acall delay
Comments to this Manuals