Any methods similar to FSRW to write to EEPROM instead?
Don M
Posts: 1,652
I understand how to use FSRW- mount, open file (name) then pputc into the file, etc. When done close file (name) then unmount.
What I can't get my head around is how something similar to this would be done using the upper 32K of eeprom. Does there exist some code & examples to do this? I found Jonny Mac's 24xx512 object in another thread and can see how to write bytes, words, longs etc to eeprom. How do I apply this to what I am looking to do?
Maybe I'm making this harder than what it should be...
What I can't get my head around is how something similar to this would be done using the upper 32K of eeprom. Does there exist some code & examples to do this? I found Jonny Mac's 24xx512 object in another thread and can see how to write bytes, words, longs etc to eeprom. How do I apply this to what I am looking to do?
Maybe I'm making this harder than what it should be...
Comments
-- http://obex.parallax.com/object/30
Probably!
FAT is optimized for flexibility with the downside that special structures are needed (the directory entries and the cluster table) which need some special handling in terms of extra I/O just for maintaining. So, if you don't need such a flexibility, it's better to have another solution. I for example prefer to use SD card with huge swap-files. Having a table at the beginning of the swap-file which tells me where to find what. This table is usually read at boot-time. But during operation there is no need to open several files or append bytes to existing files. Both slows down the system, because of the directory and cluster tables which need to be read/searched through and written back ....
What I do with my upper EEPROM is using it as storage space for PASM drivers. As a PASM driver can be max. 512 longs, I simply organized the upper EEPROM in slots where each slot has 2kB. The first slot is reserved for a directory which tells any program that makes use of PASM drivers which drivers are installed in which slot. So in total there can be 15 PASM-drivers installed. Of course a slot could also be used for data.