IC2 to The P1 EPPROM
dpientak51
Posts: 7
in Propeller 1
I want to write a couple of my variables to the epprom, so on boot up after a power cycle the veritable will retain their value. I have seen a few discussion talk about doing a write @your_variable_name but I'm not sure what the best object for that is. Can someone give me some pointers? Thanks in advance!
Comments
If you wanted to save a long variable, you would do this: Easy-peazy.
https://hackaday.io/project/162734-a-trillion-year-clock
https://forums.parallax.com/discussion/169407/a-trillion-year-clock-addons-bigbang-current-time-and-eeprom-backup-are-included
I use JonnyMac's objects:
jm_24xx256.spin
which uses his
jm_i2c.spin
I couldn't find his stuff in the GITobexHUB, so I don't know where it is other than in my attached zip file for my TrillionYearClock.zip attached file in the link at either of the above projects.
It looks like he attached the 512 object, where my project uses the 256.
You write it like this, and when your program starts, that variable's written value is loaded with the program automagically, it overwrites that exact variables data in the eeprom.
(at least with the 256 version, I don't know what the 512 version does)
Thanks JonnyMac! I stand on the backs of giants, and you are one of them!
Thanks again all!
As the optimist could be heard saying as fell down past the 40th floor from the top of an 80 story building
so far, so good!
If you look at the actual thread, you will see that this issue was already discussed, please discuss it there. The island of stability also becomes an issue if you want to get technical.