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

Back to Subject List

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


 
#162699 - Clear Interrupt flag before enabling interrupt
Responding to: ???'s previous message
Dear Kenson,

In your code, Clear Interrupt flag before enabling interrupt
Do Something like this
------------------------------------------------------------
HERE:
CLR FLAG ;set when the timer is stopped
CLR FLAG2 ;set when the timer is already started

MOV TH0, #0
MOV TL0, #0

CLR TCON.1

SETB IE.0 ;enable external interrupt 0
HERE3: JNB FLAG, HERE3 ; wait for one cycle
-------------------------------------------------------------
line in bold is to be added
Please try this & tell me the behavior

Regards,
Mahesh

List of 14 messages in thread
TopicAuthorDate
edge-triggered interrupt            01/01/70 00:00      
   no throrough analysis, but            01/01/70 00:00      
      edge triggered interrupt            01/01/70 00:00      
         you need to read "the bible"            01/01/70 00:00      
            I did            01/01/70 00:00      
   edge triggered interrupt            01/01/70 00:00      
      already answered            01/01/70 00:00      
         edge triggered interrupt            01/01/70 00:00      
   Need better comments            01/01/70 00:00      
      Document "why" instead of "how"            01/01/70 00:00      
   Clear Interrupt flag before enabling interrupt            01/01/70 00:00      
      still imprecise            01/01/70 00:00      
   Some thoughts...            01/01/70 00:00      
      the remaining part of the program            01/01/70 00:00      

Back to Subject List