EEPROM Basics
spaine
Posts: 51
I would like to have a several values stored for later use at run-time. Specifically, I would like to store several (maybe 8) byte arrays of 9 bytes each. At run-time I want to retrieve and perform a calculation for each value, removing it when I'm done.
I was wondering if it was best to use the bs2p24 internal EEPROM, or would an external EEPROM (or other memory device) be best.
I want to make sure that data in EEPROM remains there even after removal of power, and if so, for how long (minutes/days/years)? Also, I had read that some EEPROMS have limitations on the number of writes, is that the case with the bs2p24 internal EEPROM?
Thanks,
Stephen
I was wondering if it was best to use the bs2p24 internal EEPROM, or would an external EEPROM (or other memory device) be best.
I want to make sure that data in EEPROM remains there even after removal of power, and if so, for how long (minutes/days/years)? Also, I had read that some EEPROMS have limitations on the number of writes, is that the case with the bs2p24 internal EEPROM?
Thanks,
Stephen
Comments
I would recommend the use of the internal EEPROM, it's easiest to use. The space used for data storage comes from the same space used for storing programs although it's unusual for a program to need all of the "slots" of program space available. On the bs2p24, there are 8 x 2k EEPROM areas called "slots". The READ and WRITE commands can be easily used to read or write data. The STORE command (available on the bs2p devices) specifies which "slot" to use for subsequent READ and WRITE commands. There are plenty of examples in the PBasic Manual.
The trick to avoiding problems with the write limitations is to check each location before it's written to see if the value to be written is already stored in that location. That way, you don't use a write cycle to store a value that's already there from before. The other important thing is not to use EEPROM for values that change often. At one change an hour, it would take a little over 10 years to use up a memory location. At one change a minute, it would only take 2-3 months
There would be no particular advantage to using an external EEPROM since the Stamps actually use an "external" EEPROM mounted on the substrate of the Stamp.
I guess the only reason I was considering the external EEPROM would be that if the memory became obsolete (due to re-writes) I could toss it, and pop on a new one.
What do devices such as Cell Phones and PDAs use to store phone numbers with names? I mean I am always changing the way I have people's names associated with their phone number. I can't imagine buying a new Cell Phone or PDA once the memory has been re-written too much.
With that said, I could envision that a new set of data would be loaded at each run of my project. The data would change out maybe once ever 3 hours at first, and then maybe once a month on average. I would guess that at a write once a month is fine
http://www.phanderson.com/stamp/i2c/24lc32.html
It won't be fast, but it'll be big.
Also:
http://www.embeddedtronics.com/public/ApNotes/EAS-AN001.pdf#search=%22SPI%20EEPROM%22
http://www.embedded-computing.com/products/search/fm/id/?29941
Post Edited (allanlane5) : 8/30/2006 2:39:03 AM GMT
I stumbled across a new problem last night, variable memory. I will post a new thread for that, but it seems like it is one thing after another in working on your first project.
Thanks Again!
-Stephen