adding a values in eeprom
MichaelDeFalco
Posts: 19
Hello All:
I am trying to figure out how to add a count value to an eeprom location in the BS2.
I am using the write command (and read command).
When my value is greater than 255 the memory location rolls over to zero.
What is the simplest way to utilize·many locations?
Or is the best way to write hex numbers?
I need to count to 1 million.
I understand that each location can only be written to 10 miilion times-but this will outlast my hardware by many times.
Thanks...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
M.D.
I am trying to figure out how to add a count value to an eeprom location in the BS2.
I am using the write command (and read command).
When my value is greater than 255 the memory location rolls over to zero.
What is the simplest way to utilize·many locations?
Or is the best way to write hex numbers?
I need to count to 1 million.
I understand that each location can only be written to 10 miilion times-but this will outlast my hardware by many times.
Thanks...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
M.D.
Comments
The maximum count that can be expressed with 32 bits is $FFFFFFFF in hex or 4,294,836,225 in decimal. Sounds like the Propeller has what you need. The prop can express single values in 32 bits known as longs which consist of 2 words or 8 bytes. The propeller also has eight independent 32 bit processors, one of which could do the counting while the rest perform independent and even unrelated tasks.
If the indexing scheme sound interesting to you, reply and I will send you some code that demonstrates and better explains this technique.
I'm sure that some of the Parallax programming Gurus will slap me silly and have a better way to approach this problem. The last one to answer one of my posts referred to himself as a teacher, and to me as ignorant.
Thank you for your concise and practical wisdom.
Looks like the simplest way for my app.
Appreciate it-also great info. from eme...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
M.D.