> From: Chris Liechti > Sent: Friday, January 23, 2004 5:16 PM > > i think its actualy not that worse. if you log to a large > file, you can write block after block, each datablock is > only written once. of course the fat table and the > directory entry has to be written more often. but you can > keep the write rate there down too, by caching the FAT table > or at least one block.
I've never actually done this yet, but for a future data logging project, I was planning to create a single large file that fills the size of the card (minus FAT and other overhead). Then, the MSP430 will only write into the file area. That way, the MSP doesn't need to know FAT system but only where the first sector of the big file is and the MMC is still readable on a PC host. The FAT, directory and partition tables are written exactly ONCE. If you care about date/time of the file creation, you could update the directory or store that in the data. In my application, I can erase all sectors of the file at startup and stop writing when the file is full. However, if you have a continous logging application, always keep 1 or 2 sectors erased ahead of where you're writing so that when the PC reads the data it can look for the erased sector(s) to know where the data starts. - Dan Miner