Joe, My resettimer function does this: resettimer() { TMR1H =3D 0x0B; TMR1L =3D 0xDC; } Doesn't that set the timer registers back to 0 and as soon as I=20 turn the timer back on it will count to the proper value for 100mS? Thanks, rich! On 7/21/2014 10:47 PM, IVP wrote: >> Joe, >> So I would use: >> TMR1ON_OFF =3D 0; >> resettimer(); >> count=3D0; >> TMR1ON_OFF =3D 1; > Yes. > > Remember that if the timer is stopped then it will not be counting > instruction cycles for the duration of that stoppage. If you're re- > loading the timer then you will have to compensate for the stoppage > time by reducing the reload value > > eg if the timer interrupt was intended to span 1000 cycles and there > were 10 cycles of stoppage time then the reload value would be 990 > > There will still be 1000 cycles between interrupts, just that 10 of > them are code being executed > > Joe --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .