Dave Celsnak wrote: > I am using the Compare mode, to set a software interrupt on a > match (16 bit Compare Value to the 16 bit free-running Timer1). > Also, I am guessing this is the best location to clear the Timer, and > load the Compare Value with the latest (quite possibly the same) value > that is the next Period for the frequency I need. I think this is the problem. While I could be wrong, I think Dave has misunderstood how the Compare system works. The WHOLE IDEA of the Compare system is to AVOID altering the timer value itself. In fact, you do not even bother to READ the timer! This is also what makes it possible to execute multiple timing functions with only one timer/ counter. What you do in the ISR (as well as clear the interrupt flag and execute your output function) is to read the Compare register, add to this value the delay to the next Compare event (which delay is your event period) and write this back into the Compare register. It is advisable, but probably not essential, to disable the interrupt until the new value is fully written although the Compare register may provide a facility for ignoring spurious compare matches in between the two byte writes. In any case, it is probably simple enough to update the Compare register first, THEN clear the interrupt flag. It would go without saying that you check that any individual event period is not shorter than the duration of the interrupt service routine. Considerable extra care must also be taken in writing a routine for a time longer than the timer overflow. Cheers, Paul B.