Why do you subtract decimal 58 from TMR0 on each pass through? Am I missing something? Regards, Jim On Fri, 10 December 1999, Kev Howard wrote: > > Hello all! > > Back to the learning curve! > Does this routine sound ok?:- > > using a pic12c508a /internal 4meg osc and max prescale > > ;deb58 is pre-loaded with decimal 58 > > debounce ;58 x 256us = 14.8ms approx ( not > including calls/return) > > movfw deb58 ;takes number from deb58 > subwf tmro,w ;subtracts from tmro > btfss status,z > goto debounce > movlw d'58' ;resets deb58 > addwf deb58 > return > > Thanks in advance for your help > > Kev jim@jpes.com