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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
04/05/10 00:32
Read: times


 
Msg Score: +1
 +1 Good Answer/Helpful
#174837 - Limit to max period length of a timer
Responding to: ???'s previous message
If you have a 16 bit divider, it can count at max 65536 steps.

If you want 1 second delay and have 65536 steps, that means that each tick must take 15.26us.

But that is a long time for a processor.

There is a limit to how long delays you will manage with a single 16-bit counter.

When trying to get longer delays than the a timer can manage in one full-count cycle, you will have to use an interrupt that on each overflow counts down a separate variable, and when that variable reaches zero either performs an action or sets a flag. Then restarts this separate variable again.

List of 7 messages in thread
TopicAuthorDate
P89V51RD2 Timing            01/01/70 00:00      
   FAQ?            01/01/70 00:00      
      yes, but            01/01/70 00:00      
         Limit to max period length of a timer            01/01/70 00:00      
            I wouldn't just max out the timer            01/01/70 00:00      
         User manual?            01/01/70 00:00      
            User manual for P89V51            01/01/70 00:00      

Back to Subject List