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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/27/04 17:03
Read: times


 
#83949 - A bad order
Responding to: ???'s previous message
void Timerinterrupt(void)
{
TR0 = 0 //stop timer
TH0 = <>
TL0 = <>
TR0 = 1; //start running timer
z++;
if(z == 20)
{
z = 0;
seconds++;
}
}

If TL0 does not require an update may not have to update the timer. If you give the timer highest priority that will help. Disabling the interupts will hurt. An autoreload timer will be the best. but note that most mpu/Xtals are not good enough to make a clock. That requires much more accuracy.

List of 11 messages in thread
TopicAuthorDate
Interrupt latency calculation            01/01/70 00:00      
   Constant = variable            01/01/70 00:00      
      Yes that's correct            01/01/70 00:00      
         16-bit auto-reload            01/01/70 00:00      
   Performance Analyzer            01/01/70 00:00      
   Accuracy, thats the question            01/01/70 00:00      
      accuracy            01/01/70 00:00      
   A bad order            01/01/70 00:00      
   another alternative            01/01/70 00:00      
      correction Timer2 not Timer1            01/01/70 00:00      
         Timer2            01/01/70 00:00      

Back to Subject List