piclist 2000\05\27\173336a >
Thread: Delays got me beat
www.piclist.com/techref/microchip/time.htm?key=delay
face picon face BY : Sean Breheny email (remove spam text)



Hi Tim and Scott,

As Scott says, I have information about PIC loops on my page at

http://www.people.cornell.edu/pages/shb7/lop.html

I recently found out that the section on a certain type of loop (called N2
on my page) was incorrect, so I just corrected that, and added some great
suggestions from Scott and Reggie Burdin. Long overdue update of that page!

It looks like you did a better job of explaining this than I could do,
Scott. The only thing is that I get 3*M*N + 4*M + 1, instead of -1 at the
end. I think you may have forgotten the two instructions at the very top of
the loop, but it is possible that I could be the one making the mistake.

Sean


At 06:24 AM 5/26/00 -0500, you wrote:
{Quote hidden}

for
>the very last one which only takes two cycles.
>
>x=0 is a special case. The first time through the loop, x will decrement
to 255.
>So what happens is that the maximum delay time occurs for x=0. And in
fact, the
>time for the loop to execute is 2 + 3*(256-1) cycles. So for x=0 you
substitute
{Quote hidden}

extra
{Quote hidden}

This is
>the time it take for this snippet to execute:
>
>> Pause Movlw  "value2"
>>           Movwf  N
>>
>> Delay1 Decfsz N
>>          goto Delay1
>
>There are two cycles for initializing N and then there's the loop. So the
total
{Quote hidden}

| Sean Breheny
| Amateur Radio Callsign: KA3YXM
| Electrical Engineering Student
\--------------=----------------
Save lives, please look at http://www.all.org
Personal page: http://www.people.cornell.edu/pages/shb7
EraseMEshb7spamspamSTOPspamcornell.edu ICQ #: 3329174
_____________________________________________
NetZero - Defenders of the Free World
Click here for FREE Internet Access and Email
http://www.netzero.net/download/index.html

<3.0.3.32.20000527173130.00983cb0@postoffice2.mail.cornell.edu>

In reply to: <Pine.LNX.4.21.0005260549100.3287-100000@tempest2.blackhat. net>
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...