Professional Documents
Culture Documents
Interrupts in 8051
Introduction
Microntroller job is to wait for the event Microcontroller keep on doing another
to occur to serve the device, it does jobs until Interrupt Occurs and then
not do anything except wait processes ISR
ORG 0030H
MAIN: MOV TMOD,#02H
MOV TH0,#9CH
MOV IE,#82H ;ENABLE TIMER0 INTERRUPT
SETB TR0
SJMP $
01/09/15 8051 Interrupts - Copyleft 8
Programming Serial Communication Interrupt
Program to send 'A'
ORG 0000H
LJMP START
ORG 0023H
CLR TI
RETI
ORG 100H
START:MOV TMOD, #20H
MOV TH1, #0FDH
MOV SCON, #50H
MOV IE,#90H
SETB TR1
MOV A, #'A'
MOV SBUF, A
SJMP $
END
01/09/15 8051 Interrupts - Copyleft 9
External Hardware Interrupts
INT0 P3.2
INT1 P3.3
Level Triggered Low-Level Signal triggers Interrupt
INT0,1 Are High By Default
Minimum Low for 4 Machine Cycles
Toggle P1.0 when Interrupt INT0 occurs and P1.1 for INT1
ORG 0000H
LJMP MAIN
ORG 0003H
CPL P1.0
RETI
ORG 0013H
CPL P1.1
RETI
https://www.sites.google.com/site/sripathroykoganti/my-forms