Doesn't work for me :-(
Doesn't work for me :-(
Currently the datalogger I'm using uses two internal FRAM chips. It has 256 kb each. So yea, it's quite a bit of memory to download. Which is why I think I am going to go with the the MMC solution. I've finally finished reading the sandisk mmc product manual and feel pretty confident about the process for reading and writing to the card.
I think I know how to write data to the MMC as raw memory... but I don't know how to write the data as a 'text file'? I want the user to be able to plug the MMC into a card reader on their laptop and simply open the information as a text file. Where can I go for more information on how to do that?
Thanks, Mercy
This topic has been discussed often in this group, so you might want to search. Basically, MMC or SD cards can be driven from an SPI interface. It sound like you know how to read and write sectors. To write files you will need code to implement the FAT files system. Usually FAT16 is sufficient. You can get code to do it that fits in to small micros, google for DosFS or FatFS. Typically these require ~1K RAM and a few Ks code.
Peter
Lewin's DosFS will handle the file system side of things as long as you can read and write your 512byte blocks to/from the MMC card where requested. You can get it here
As for composing the test file, then it is just a list of ASCII characters which you can write into an appropriate card location from whichever array you stored them in. The heart of the prblem is composing the 512byte blocks to put into the MMC card and working out where (from the FAT) you are going to store them.
I wish I could send you my code but the company would frown on it but it is really not that complicated (and I am no whizz kid believe me). I don't bother with FAT32 and just stick to FAT16 with 8.3 filenames (make sure the MMC card is formatted for FAT 16) to keep it simple.
256kB = 32Kbyte * 2 = 64KiloBytes !!!
What is the FRAM chip involved ?
The smallist MMC chip currentyly available is 32MegaBytes !
I am confused about the sizes involved.
Are you sure about the FRAM here ??
Sorry, I get confused between kb and Kb. I meant Kb :-)
-Mercy
Thanks again for all your help guys.
I'm not researching the FAT16 stuff. Everyone keeps pointing me to Lewin's DosFS for help... so I went there :-)
I've downloaded the 'DOSFS distribution archive' from the zws website. But everytime I try to unzip the compressed file with winzip, I get an error... something about the headers being corrupt. I can't believe I can't even unzip a file! Now I feel really silly. Does anyone else run into the same problem? I'll keep trying and looking around for more info on the file system stuff :-)
-Mercy
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.