Well for the fun of it, I tried using the external oscillator with TIMR0 using a 32.768Khz crystal.

The oscillator is basically a watch crystal, a couple of caps, some resistors and a hex inverter IC.

Leaving the pre-scaler at 1:1 though you end up with 128 interrupts (ticks) per second.

32,768/256=128 so that doesn't really help with your 1/100th of a second. But the timing is bang on! I suppose you could do some fancy math here to increment TIMR0 every so often to get it to 100 but not worth it.

So let's say you move up to a 3.2768Mhz crystal.
In that case every 128 ticks will be 1/100th of a second. And that would be perfect for your app.

3,276,800/256=12,800

increments a 1/100th of a second var every 128 interrupts.

So you need a ticks var... and in the ISR when ticks=128 you increment your centisecond var (1/100th of a second var).

When the centisecond var gets to 100 increment your seconds var and so on.

The other cool part about it is the PIC is still running at 20Mhz.


Cheers,
Mike