> I recently put together a clock using a Timer1 external oscillator. I > used a 32.768 kHz crystal. The program is designed to 'tick' every > two seconds, as the Timer1 buffer overflows. Unfortunately, the ticks > come every 1.8 seconds, instead. I thought maybe I'd done something > screwy to the crystal, but the oscilloscope shows it chunking away at > as close to exactly 32.768 kHz as I can measure on it. (i.e. Maybe > not exact, but certainly not 10% off.) I had a problem once with this sort of thing; the timer would work fine when my project was "awake", but when it went to sleep the timer seemed to speed up. The problem was that I'd made two mistakes that cancelled each other: [1] I'd enabled the wrong interrupt bits (I never used interrupts; I just polled the timer overflow), so the timer interrupt wouldn't cause a wakeup. [2] After the sleep, rather than polling the timer I figured it must have been what woke me up. In fact, the CPU was being awakened by the watchdog which--as luck would have it--was hovering around two seconds. At times, therefore, the clock would run a little fast while asleep; at other times it was slow. Quite confusing until I finally figured it out.