Re: Embedded w/ either SD Memory or CompactFlash
- From: Jörg Schneide <J.Schneide@xxxxxx>
- Date: Thu, 06 Nov 2008 15:21:43 +0100
mpm wrote:
[...]
So, SD just uses standard SPI, and the 4-bit version has the hoops.
Am I correct in assuming that the non-4-bit version has better
throughput?
Of course the 4 bit interface has more throughput.
Also, I'll want to write these SD cards through Windows (PC).
I assume that's no problem with the standard SPI mode.?
Has nothing to do with the SPI Mode, AFAIK.
I would do it this way: Write a prepared file with fixed name and lenght
to a fresh and empty card (they come formatted as FAT12 or FAT16) with Windows.
On your 8051: Implement a simple routine to search step by step through the boot-sector, FAT and
directory to check for existence and to get the beginning (absolute address) of the file.
It is better to place a unique byte-sequence at the beginning and check it
to be shure you got the right address.
With this offset address you can access your LUT (beginning at byte #1 of the file)
by simple adding.
Take a look at the SD-specs for the commands, up to now I have used only commands
for complete sectors (512Byte), which may be not possible in your 8051 due to limited RAM.
There are commmands for sequenced reading too if my memory is right.
Important: If you need to replace the file on the card always delete it before you write
the new one, don't allow windows to create a recycle bin folder or something.
The file may not be fragmented.
If necessary do not try to format the card in Windows file manager,
there are special Programs for that purpose.
You can use disk-editor software for formatting too
(must be capable to access sector 0 on flash cards):
Make a backup copy of the first sectors (from real sector 0 to the end of the file system)
from a fresh new card. If needed, just write it back.
Don't use such images on other card brands with the same capacity, there might be differences.
Jörg.
.
- Follow-Ups:
- References:
- Embedded w/ either SD Memory or CompactFlash
- From: mpm
- Re: Embedded w/ either SD Memory or CompactFlash
- From: Jamie
- Re: Embedded w/ either SD Memory or CompactFlash
- From: osr
- Re: Embedded w/ either SD Memory or CompactFlash
- From: Clifford Heath
- Re: Embedded w/ either SD Memory or CompactFlash
- From: mpm
- Embedded w/ either SD Memory or CompactFlash
- Prev by Date: Re: Embedded w/ either SD Memory or CompactFlash
- Next by Date: Re: On air Digital Video Recorder
- Previous by thread: Re: Embedded w/ either SD Memory or CompactFlash
- Next by thread: Re: Embedded w/ either SD Memory or CompactFlash
- Index(es):
Relevant Pages
|