Jinx escreveu: > I can see that you could use several methods to get the pulse you want ; > > >From 1us up to a certain length > > bsf > (X * nop) > bcf > > >From there to another length, an 8-bit decrement > > bsf > decfsz X > bra $-1 > bcf > > After that I think you'll need to go to a 16-bit decrement. For example > 200us is 1000 instruction cycles Don't forget that you may insert several NOPs or goto $ + 1 before the decfsz: bsf goto $ + 1 decfsz X,f goto $ - 2 bcf I like this one: movlw N L: clrwdt addlw -1 btfss STATUS,Z goto L ; Each loop takes 5 Tcy =3D 1us @ 20MHz Longer time: movlw N L: clrwdt goto $ + 1 goto $ + 1 nop addlw -1 btfss STATUS,Z goto L ; Each loop takes 10 Tcy =3D 2us @ 20MHz Regards, Isaac __________________________________________________ Fa=E7a liga=E7=F5es para outros computadores com o novo Yahoo! Messenger = http://br.beta.messenger.yahoo.com/ = -- = http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist