Modified:
/trunk/include/external/storage/pata_hard_disk/pata_hard_disk.jal
Joep
2010/10/6 mattschinkel <mattsc...@hotmail.com>:
> What is the shortest delay I can make? Is there anything in JAL?
>
> I used "asm nop"
>
>
> Matt.
>
> --
> You received this message because you are subscribed to the Google Groups "jallib" group.
> To post to this group, send email to jal...@googlegroups.com.
> To unsubscribe from this group, send email to jallib+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/jallib?hl=en.
>
>
I'm sure your talking about nanoseconds, not picoseconds... in 100ps at the speed of light you're travelling 3cm (1 inch).
At 16MHz and below, two successing machine instructions are already 250ns apart.
From 40MHz upward, a single nop does consume less than 100ns. So my suggestion would be:
procedure delay_100ns() is
pragma inline
if target_clock >16_000_000 then
asm nop
end if
if target_cock >40_000_000 then
asm nop
end if
end procedure
Greets,
Kiste
Greets,
Kiste
> For faster
> reading/writing,
> you should use read_sector()
Err, not yet... on 32MHz, pata_hd_read_data() gave me about 320kbytes/s, while read_sector() gave about 130kbyte/s. When large_array is not used, read_sector() yields about 520kbytes/s. (Didn't write that numbers down, so it's very approximately.) My measurements showed me, that read_sector() indeed uses much RAM to be even slower than read_data().
> I have done many modifications already to the hard disk/sd
> card
> libraries,
Ok, time to svn up :-)
> so let me know what suggestions you have
You'll regret that one ;-)
> As for fat32, it needs a lot more work to be more user
> friendly,
yes... I've tried the sample program on a 18F4520. It did not work. Why it didn't work will stay fat32's secret :-)
We'll get it fixed sooner or later.
Greets,
Kiste