It's a shame about the loss of program formatting on that site...Here's a nice tutorial on PIC timers and counters, if you are interested.
http://embedded-lab.com/blog/?p=1042
Agreed.It's a shame about the loss of program formatting on that site...
I read that a while back. I really like the ZEZJ algorithm!I like to use a real one-second generator somewhere in the loop, and it can be used to sequence slow events like time-outs on the user interface etc. Of course once you have an accurate 1 second timer built into your program you can use it for a heap of stuff.
There's lots of code examples here; http://www.romanblack.com/one_sec.htm
that let you generate the 1 second period from any xtal freq and any interrupt frequency.
by Duane Benson
by Jake Hertz