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

Back to Subject List

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


 
#70108 - Same old wine in a new bottle
Responding to: ???'s previous message
I usually start coding uCs by making a basic clock for myself using one of the provided hardware timers.

Let's take timer0 (for instance)and adjust its SFRs and Timer load registers to get an overflow interrupt in every 1mS(say). In this Interrupt subroutine, we can increment a RAM counter of our own so that, at any time, a reference to this counter would provide us with a clockcount (Basically this is what every OS is doing).

We can run our custom timer applications and timed jobs based on this clockcount.

So the only thing which may limit the number of timers we can have, maybe the available number of general purpose RAM registers for keeping separate counters for each application timer.
(Exactly as Mr.Karas and Mr.Bull pointed out)

regards

Achu


List of 7 messages in thread
TopicAuthorDate
Can we expand the timers in 89c52 uC            01/01/70 00:00      
   RE: Can we expand the timers in 89c52 uC            01/01/70 00:00      
      RE: Can we expand the timers in 89c52 uC            01/01/70 00:00      
      48 Timers?!            01/01/70 00:00      
         RE: 48 Timers?!            01/01/70 00:00      
   RE: Can we expand the timers in 89c52 uC            01/01/70 00:00      
   Same old wine in a new bottle            01/01/70 00:00      

Back to Subject List