Why 10 mS, 100 Counts? You are thinking like a person and not a computer. Computers like powers of 2s not 10s.
Why not use a 4.194304MHz Xtal (DigiKey has them in stock for $0.70 ea), let Timer 1 run free, set the prescaler to 8, and count TMR1 overflows. 2 Overflows = 1.000 sec. This gives you lots of time to do other stuff in between interrupts.
(math = 4/4.194304*65536 * 8 * 2 = 1000000 uS = 1 S)
Oh yeah, you also do not have to deal with accounting for the timing for saving registers etc because the timer is free running.
Paul Borgmeier
Salt Lake City, UT
USA
__________________
Bookmarks