EXPT. NO.
04
INTERRUPT HANDLING
Aim: Write an ALP for 8051 to handle external interrupts. Set P2.4 when external interrupt (INT0) is
generated and clear P2.4 when external interrupt (INT1) is generated.
Apparatus: 1. Keil uVision
Program:
SJMP 30H
ORG 0003H
SETB P2.4
SETB P3.2
RETI
ORG 0013H
CLR P2.4
SETB P3.3
RETI
ORG 30H
SETB IE.7
SETB IE.0
SETB IE.2
L1: SJMP L1
END
Output: