On Wed, Oct 6, 2010 at 9:01 PM, mattschinkel <[email protected]>wrote:

> Continued from the IDE hard disk discussion...
>
> http://groups.google.com/group/jallib/browse_thread/thread/74aed0199d29f980/aaad8c7208ba4838#aaad8c7208ba4838
>
> We need a smaller delay procedure (100ns). I'm sure we can come up
> with a better procedure then we have both posted.
>
> If you are using a slower clock should there be any delay? Where do
> you draw the line. We are not only talking about IDE. If a user wants
> the smallest delay possible (even on a 2mhz crystal), should they be
> able to use this procedure to do so? If the clock is 2mhz, should
> there be a "asm nop"?
>


  Kiste's procedure is quasi ok:

procedure delay_1tcy_or2tcy() is
   pragma inline
   if target_clock > 40_000_000 then
     asm goto $+1 ; constant expression expected here
   elsif target_clock >16_000_000 then
     asm nop
   end if
 end procedure

However, even the procedure looks nice (which has nothing with the
procedure's effect in the real world)
is useless to write so much  code to get one or two nops.
So, for almost any PIC, talking about a precisely 100nS delay is a  waste of
time.

Vasile




>
> Matt.
>
> --
> You received this message because you are subscribed to the Google Groups
> "jallib" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<jallib%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/jallib?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en.

Reply via email to