soh m
Newbie level 6
lets assume pin P3.3(INT1) is connected to a pulse generator,write a program in which the falling edge of the pulse will send a high to P1.3,which is connected to an LED.
in this problem should i have to write assembly language for LED interfacing also???
can anyone help me to write the assembly language for this problem....
i have written this....
ORG 8100H ;initialization
LJMP MAIN
;-- hardware interrupt INT1 to turn on LED
ORG 0013H ;INT1 initialization
SETB P1.3 ;LED turn on
MOV R3,#255
BACK: DJNZ R3,HERE ;keep the LED on
CLR P1.3 ;off the LED
RETI ;return
;-- main program
ORG 30H ;initialization
MAIN: SETB TCON.2
MOV IE,#10000100B ;enable external INT1
HERE: SJMP HERE ;stay until get interrupted
END
is it right??? or something need to be added??? please help me...its urgent
in this problem should i have to write assembly language for LED interfacing also???
can anyone help me to write the assembly language for this problem....
i have written this....
ORG 8100H ;initialization
LJMP MAIN
;-- hardware interrupt INT1 to turn on LED
ORG 0013H ;INT1 initialization
SETB P1.3 ;LED turn on
MOV R3,#255
BACK: DJNZ R3,HERE ;keep the LED on
CLR P1.3 ;off the LED
RETI ;return
;-- main program
ORG 30H ;initialization
MAIN: SETB TCON.2
MOV IE,#10000100B ;enable external INT1
HERE: SJMP HERE ;stay until get interrupted
END
is it right??? or something need to be added??? please help me...its urgent