Simplest way to transfer dat files to eeprom?
T Chap
Posts: 4,223
DAT graphic39_data long 'file "enteradmin.dat" PUB EEPROMCONFIG 'WriteBlock(epenteradmin,@graphic39_data& $FFC0, 640) '39 '23 more of these writesAt the moment there are 24 dat files that are transfered one at a time using the method shown above. Probably two could be copied, but that still doesn't solve the problem of requiring multiple steps(running multiple spin programs). This is for a project that I need to copy numerous boards with bitmaps that are converted to dat files. The dat files are stored on extra eeprom above 32k, and are called up as needed for LCD use.
Since there are now 24 files at 640 bytes, the Prop can't store all at the same time, and more will be added to the project on an ongoing basis. What is the best way to load up the eeprom with the least effort per load?
Comments
Since these files are 640 bytes each, you could also have 40 or more of them per Spin program (40 x 640 = 25600 bytes) and still have room for the EEPROM write routines (like from "Basic I2C Driver") and your main method that would write these files one at a time to the EEPROM. You'd download this program to RAM and it would automatically run, then you'd do the same with a 2nd similar program to write the next 40 files, etc.
-Phil
File data stored in a DAT section is no different than data stored using a long, word or byte command. You are only limited by the size of hub RAM, and not by the size of cog RAM. You may be thinking of the size of a cog program, which is also defined in a DAT section, and is intended to fit in the cog's 2KB RAM.
You could write a single program that transfers all 24 files to EEPROM at one. There is no need for an SD card in this case. You don't even have to disrupt the lower 32K of EEPROM if you load the program in RAM and run it.
Dave
Thanks.
'Just checked that. You're right.
-Phil