Hi Sean, I think this is not the case, my routine has a "goto $+2" not a "goto loop" after the first increment (to be isochronous to 5 cycles per loop). The total cycles should be: Cycles = (65536 - (hi * 256 + lo)) * 5 Except when hi and lo is zero which is 65536*5 cycles. regards, Reggie -- e-mail: rberdin@bigfoot.com ICQ#: 31651436 URL: http://www.bigfoot.com/~rberdin Sean Breheny wrote: > In case anyone wants to use this loop, the more general form is: > > movlw x > movwf xf > movlw y > movwf xy > delay(A) > aloop delay(B) > decfsz xf,f > goto aloop > delay(C) > decfsz yf,f > goto aloop > > Which has the timing expression: > > total cycles = (770+256*B+C)*Y + (B+3) * X + A + 2 > > In the case given by Reggie, where A=B=C=0: > > total cycles = 770*Y + 3*X + 2 > > Sean > > At 09:42 AM 5/7/99 +0800, you wrote: > >Hi Scott, > > > >How about, 5 cycles per loop, doesn't use W: > > > > clrf lo > > clrf hi > > > >loop incfsz lo,f > > goto $+2 > > incfsz hi,f > > goto loop