Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
09/21/02 12:31
Read: times


 
#29475 - RE: interupts and timers
Here is your code example. The button is connected at port 3.2 (external interrupt 0). When the button is pressed, a LED on port 3.7 will be toggled.

ljmp start
org 0003h ;interrupt service routine
push psw ;save psw to stack
cpl p3.7 ;toggle LED
pop psw ;load psw from stack
reti ;return to where we came from
start:
clr it0 ;set ext. int. on "falling edge"
setb ea ;enable interrupts
setb ex0 ;enable external interrupt 0
sjmp $ ;do nothing

List of 10 messages in thread
TopicAuthorDate
interupts and timers            01/01/70 00:00      
RE: interupts and timers            01/01/70 00:00      
RE: interupts and timers            01/01/70 00:00      
RE: interupts and timers            01/01/70 00:00      
RE: interupts and timers            01/01/70 00:00      
RE: interupts and timers            01/01/70 00:00      
RE: interupts and timers            01/01/70 00:00      
RE: interupts and timers            01/01/70 00:00      
RE: interupts and timers more            01/01/70 00:00      
RE: interupts and timers more            01/01/70 00:00      

Back to Subject List