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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
04/12/01 14:20
Read: times


 
#10756 - RE: Timer Interrupt
Hi Erik,

you are wrong !

The timer reloads exact on the cycle, on which the overflow occur.
Also it continue counting independend, if the interrupt was served or not.
Thus why all interrupt events can also be served with polling the interrupt pending flag.

So the timers counting always right also if you use automatic reload or software reload.

The only condition:
You should disable interrupts no longer, than the time between 2 interrupts. Since than a 2. overflow can occur prior the 1. was already served.
E.g. if you reload the timer to get the next interrupt after 1000 cycle, the interrupt can be disabled for no longer than 990 cycle (-10 cycle to serve the maximum interrupt response time).

E.g. I use the timer T0 in mode 3, which give me interrupts every 256 cycle. Also I serve a DS1820 temperature sensor, which need to generate a bit time of 60µs. So I need to disable interrupts for 60 cycle and my software RTC works still right.


Peter


List of 9 messages in thread
TopicAuthorDate
Timer Interrupt            01/01/70 00:00      
RE: Timer Interrupt            01/01/70 00:00      
RE: Timer Interrupt            01/01/70 00:00      
RE: Timer Interrupt            01/01/70 00:00      
RE: Timer Interrupt            01/01/70 00:00      
RE: Timer Interrupt            01/01/70 00:00      
RE: Timer Interrupt            01/01/70 00:00      
RE: Timer Interrupt            01/01/70 00:00      
RE: Timer Interrupt            01/01/70 00:00      

Back to Subject List