Joe, So I would use: TMR1ON_OFF =3D 0; resettimer(); count=3D0; TMR1ON_OFF =3D 1; while { count < limit; } Yes, no?? Thanks, rich! On 7/21/2014 9:24 PM, IVP wrote: >> turning the Timer off and on shouldn't TMR1IF_bit be TMR1IE_bit? > There are 3 bits > > TMR1ON_OFF starts/stops the timer running > > TMR1IE is one of the bits allowing the hardware to recognise TMR1 > interrupts (there are others for timers and other various functions in > PEIE, PIEx, PIRx and INTCON) > > TMR1IF is the interrupt bit, set automatically when TMR1 goes from > FFFF to 0000, whether interrupts are enabled or not (eg IF can be > polled by s/w) > > If TMR1ON_OFF =3D 0 then TMR1 is stopped and its current value > is frozen, regardless of the state of any interrupt bits > > TMR1IE =3D 0 (or any relevant IE in the pathway) will stop interrupts > being recognised by the system but it's not the same as starting/stopping > the timer > > 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 .