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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
08/14/05 13:18
Read: times


 
#99374 - It looks obvious to me....
Responding to: ???'s previous message
Why do you invert the 'flag' variable in the ISR? First time through it will work, but nowhere in your code is it reset!

Why not just say:


timer0_isr:
{
flag = 1;
TR0 = 0; //stop the timer
}


main code:

if (flag)
{
flag = 0;
//do other stuff
}



List of 4 messages in thread
TopicAuthorDate
AT89S8252 COUNTER PROGRAM IS NOT WORKI            01/01/70 00:00      
   Reformat using [pre][/pre] html tags!!!            01/01/70 00:00      
      counter program            01/01/70 00:00      
   It looks obvious to me....            01/01/70 00:00      

Back to Subject List