Hi, On 29/08/2011 10.27, IVP wrote: > Hi all, > > I've been reading these two pdfs > > www.cs.ucr.edu/~amitra/sdcard/ProdManualSDCardv1.9.pdf > > www.mikrocontroller.net/attachment/.../SDHC_SDM04G7B7_08G7B7.pdf > > The first, SanDisk, says (page 3-24) that there are 20480 sectors > of 512 bytes in the protected system area. The second, Toshiba, > says (page 34) that its cards have 65536 * 512 bytes in the protected > area I think that "protected system area" is related to the "extended" functio o= f SD=20 card. The size is returned in the SD Status data block (512 bit) with command ACM= D13=20 (CMD55 + CMD13). > > I read that the MBR doesn't always start at Sector/Block 0. FALSE! > I'm > not wanting to use FAT with a particular test card (made by Phison > AFAICT from the CID response), just straight data storage in an > embedded environment, so I'd like to know the writable sectors of > any card I end up using for this product > > The card in a reader comes up as I: on my PC, and I tried a > couple of XP utilities to try and find out which sectors are in > use after formatting, but nothing was forthcoming > > Is there a utility anyone could recommend for finding out what > sectors FAT is installed in ? I *could* read the whole card a > sector at a time and log which are not FF but ....... Read sector 0, some card has MBR http://en.wikipedia.org/wiki/Master_boot_r= ecord=20 and only 1 partition (more not alloved by specs) other has only Boot sector= =20 http://en.wikipedia.org/wiki/Fat16#Boot_Sector My datalogger write chunks of 2MB so I wrote a library for FAT16 to find an= d=20 allocate a contiguous space and to write a file descriptor in the main=20 directory, after this I write directly to the sectors. If you need to "fill" the card you can just allocate a single file and use = some=20 "spare" byte in the boot sector to say to firmware: first sector, size (in= =20 sector or bytes), etc I'm curious: how many bytes/sec are you able to write? --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .