Chuck Norcutt wrote:
> If, as someone here said, an SD card doesn't contain an embedded IDE
> controller as does a CF card, the software's I/O instructions would have
> to occur at a much lower control level. Something that works with an SD
> card would have to have a front end to simulate the controller's actions.
It's not an IDE controller, but it does have a controller.
SD cards are split into two units - Blocks and Pages. Each block is 512 bytes,
each Page is about 16 blocks, though that varies depending on the card. You
can only erase a Block, but you can write any number of Pages, provided
they've already been erased. I can't remember if SD does an auto-erase before
writing - some cards copy the page into a temporary buffer, erase it, then
write the old data back, with the new sector patched in.
But anyway, you have a couple of basic commands - READ_CSD (Read Card Specific
Data - "who made you, how big are you, how much power do you need?"),
READ_BLOCK, WRITE_BLOCK and ERASE_PAGE. As far as commands go, that's it. The
reason there's an ERASE command is because you might want to wipe out an
entire page of data, then write that amount. The card keeps track of the
erased blocks and writes the data straight in.
CF is pretty much the same - read, write, identify, power down. The big
difference is the interface - SD and MMC use a serial interface, CompactFlash
uses an 8- or 16-bit parallel interface. On paper CF is faster, but the big
attraction is that you can stuff a hard drive into a CF card (go read up on
the Hitachi MicroDrive). An MMC or SD is just too small to do that.
Both of them do neat little tricks like automatic wear levelling and block
substitution (swapping in new blocks when old ones fail). The only card that
needs that stuff doing externally is the SmartMedia card (which makes SM
really, really slow). SM is nothing more than an off-the-shelf flash memory
chip on a plastic card - no controller to speak of.
--
Phil. | Kitsune: Acorn RiscPC SA202 64M+6G ViewFinder
philpem@xxxxxxxxxxxxx | Cheetah: Athlon64 3200+ A8VDeluxeV2 512M+100G
http://www.philpem.me.uk/ | Tiger: Toshiba SatPro4600 Celeron700 256M+40G
==============================================
List usage info: http://www.zuikoholic.com
List nannies: olympusadmin@xxxxxxxxxx
==============================================
|