Just a thought. Why not use one of the timers for an exact interrupt delay rather than working with code loops? Example: use TMR2 and set pre- post- and main counters so that you get the delay you want, then interrupt or sample on that...count it in a routine. Hope that is helpful..... Phil On Friday, May 26, 2000 3:02 AM, Tim Hamel [SMTP:TekPhobia@AOL.COM] wrote: > Hi Friends, > > I'm once again at everyone's mercy. I usually try to exhaust all my resources > and fight with something before posting a problem to the list; but I'm stuck. > I consider myself pretty handy with PICs, but this topic has me buried in > books and sites. > > I can't, for the life of me look at a piece of delay code and tell you how > long it delays for. I've tried breaking it down, reading over David Benson's > piece about it over and over, but still have a big "?" on my forehead. The > simple one-shot delays I can figure, but this gets me: > > >From David Benson's "Easy PIC'n," it's been tweaked a bit: > > Movlw "value" > Movwf M > Pause Movlw "value2" > Movwf N > > Delay1 Decfsz N > goto Delay1 > decfsz M > goto Pause > return > > Ok, for the finale, he gives the formula for the delay as "3MN," how!? Could > some kind soul break down into bits and pieces so I could figure it out? I'm > going to be doing a weather project, and I'm sure I'll need this knowledge. > Hopefully, I'll be able to complete the project without being dependant on > you guys =) > > Much thanks in advance, > > Tim Hamel