Another technique used by a friend in a datalogger is, I thought, very clever. He uses an MMC in SPI mode. He "formats" the MMC in a PC, creating a very large text file that consumes the entire MMC. The text file is written with a unique identifier at the beginning. When the PIC writes to the MMC, it looks for this unique identifier to know where to start writing. It then overwrites this area, and rewrites the identifier in the next available location. When the MMC is read back on the PC, there is still the single large text file, but the substituted data is now in the text file. The unique identifier marks the end of data. This technique counts on the freshly formatted MMC creating the large text file in sequential sectors. I assume that the PC OS would indeed create the file this way (not do any interleving or for some other reason not write to sequential sectors). Very cleaver, I thought. I might use the idea some day! Harold >> Hi Everyone, >> >> I need to write some data to the MMC card using the PIC >> microcontroller. But the MMC card must implement file system(any >> file system is fine). My question is how should I write the data >> in accordance to the file system. > > IIRC an MMC card allows you to shift out one sector (512 bytes) at > a time > serially. As for the file system, if you want to use FAT16 in a > rudimentary > way you can have a look at my Carmon project: > > http://repatch.dyndns.org:8383/pic_stuff/carmon/ > > I took a very simplistic approach, expanding it to fill your needs > should > be simple. TTYL > > ---------------------------------- > Herbert's PIC Stuff: > http://repatch.dyndns.org:8383/pic_stuff/ > > -- > http://www.piclist.com hint: The PICList is archived three different > ways. See http://www.piclist.com/#archives for details. > -- FCC Rules Online at http://www.hallikainen.com/FccRules/ -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.