cascade Timers on pic 16f877

Status
Not open for further replies.

vheerdg

New Member
Can any one tell me how to cascade the timers to form a minute or hour timer I know how to activate them. Can anyone please help............. THANKS
 
Just use a timer to create a regular interrupt (timer2 is probably the easiest), say every 10mS, then increment counters in software every interrupt.

It's a standard technique, and has been for decades.
 
Nigel i even forgot how to do it lol If i set a 10mS interrupt.. for 1 second i would have to

1000mS(1s) / 10mS Per Interrupt = 100 interrupts to count to 1 second right?
 
Nigel i even forgot how to do it lol If i set a 10mS interrupt.. for 1 second i would have to

1000mS(1s) / 10mS Per Interrupt = 100 interrupts to count to 1 second right?

Yes, then at 1 second zero the 10mS counter and start counting up for the next second.
 
oh ok cool had to make sure its still locked in my head I seem to forget things when i dont use them.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…