> Keep in mind that you also MIGHT experience a tiny jitter caused by an > interrupt occurring between 2-cycle instructions, which are always > completed before the INT is taken. This tiny error is not accumulative > so won't affect anything. > > --Bob If you need to, you can 'dejitter' the timing as follows in the interrupt handler: btfsc TMR0,0 goto $+1 A: If bit 0 of the timer is set, this code takes 3 cycles, if not it takes two cycles, this you always give to point "A" when the timer has the same value. (Actually this is a simplification, you may need to use a btfss instead of a btfsc, I am too lazy to figure out which right now). Bob Ammerman RAm Systems -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads