0% found this document useful (0 votes)
108 views1 page

8051 Interrupt Handling

The document describes an experiment to write an assembly language program for the 8051 microcontroller to handle external interrupts. The program sets pin P2.4 high when external interrupt 0 occurs and sets it low when external interrupt 1 occurs. It uses Keil uVision and sets the relevant interrupt enable bits to allow interrupts on the desired pins, then enters an infinite loop to wait for interrupts.

Uploaded by

c2ecehod
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
108 views1 page

8051 Interrupt Handling

The document describes an experiment to write an assembly language program for the 8051 microcontroller to handle external interrupts. The program sets pin P2.4 high when external interrupt 0 occurs and sets it low when external interrupt 1 occurs. It uses Keil uVision and sets the relevant interrupt enable bits to allow interrupts on the desired pins, then enters an infinite loop to wait for interrupts.

Uploaded by

c2ecehod
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

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:

You might also like