Ben wrote: > I could be doing something stupid, but I am having > trouble simulating a simple isr that is supposed to > happen every 208 cycles. When using the stopwatch, I > was getting 209. I simplified the problem in a test > project, and the symptoms are the same, TMR0 is losing > track of time. Actually, it sounds like Microchip has finally fixed a long-standing bug = in the simulator... There is actually a 3-cycle fudge factor when adding a value to TMR0: on the cycle of the add itself, the pre-incremented timer value is read, and= the result of the addition overwrites the incremented value, so effective= ly no increment happens that cycle. This is followed by two cycles in which= no increment happens, as documented. I think that if you were to try you= r program in an actual PIC, you'd find that the simulator results now match= reality. Jason Harper -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.