piclist 2000\05\26\040258a >
Thread: Delays got me beat
picon face BY : Tim Hamel email (remove spam text)

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

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

<98.579298f.265f8979@aol.com> 7bit

See also: www.piclist.com/techref/microchip/time.htm?key=delay
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) Delays got me beat

month overview.

new search...