Question about memory
computer guy
Posts: 1,113
I need to be able to save over 100 variables in memory that can be changed post programming, and have it retain the value after a loss of power.
In the past I have changed the value of the variable on the EEPROM the propeller is using however due to constant reading and writing this method will age the EEPROM rapidly, something I can't afford to do in this project.
Is there another way that I can save "settings" to memory and have them last a loss of power?
Thank you
-Anthony
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"powered by Propeller" domed stickers $1.50 - Find them here
Check out my Design and Technology project for my Higher School Certificate www.ecosureblog.net
In the past I have changed the value of the variable on the EEPROM the propeller is using however due to constant reading and writing this method will age the EEPROM rapidly, something I can't afford to do in this project.
Is there another way that I can save "settings" to memory and have them last a loss of power?
Thank you
-Anthony
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"powered by Propeller" domed stickers $1.50 - Find them here
Check out my Design and Technology project for my Higher School Certificate www.ecosureblog.net
Comments
You could put a small EEPROM (24C32) on the same bus as the boot EEPROM.
MacGeek
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
BS2: $49
SX48 Protoboard: $10
Propeller Protoboard: Priceless
www.apple.com
www.parallax.com
www.goldmine-elec.com
www.expresspcb.com
www.jameco.com
last time I used the EEPROM I referenced the starting address of the variable (@var1) to overwrite the value.
If I was to use a second EEPROM on the same bus, how would I read and write variables?
Thank you
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"powered by Propeller" domed stickers $1.50 - Find them here
Check out my Design and Technology project for my Higher School Certificate www.ecosureblog.net
I would also like to save on EEPROM space if possible, so I like the idea of a second EEPROM or FRAM.
Is there a simple way of reading and writing data to this second chip?
Thank you
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"powered by Propeller" domed stickers $1.50 - Find them here
Check out my Design and Technology project for my Higher School Certificate www.ecosureblog.net
However you can often reduce writes by first checking if the value there is already equal to what you want to write or by having a large cap and a brown out system that will warn you to write all important variables to eeprom before the power goes out.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
24 bit LCD Breakout Board now in. $21.99 has backlight driver and touch sensitive decoder.
I am using the rtc chip that parallax sells for my project, however I would rather not use this as I will be constantly reading the time (once or twice every second).
Another reason that I wan't to keep it on a seperate chip is that with my last project, every time I updated the "firmware" on my project, the variables would go back to their default value.
Thank you
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"powered by Propeller" domed stickers $1.50 - Find them here
Check out my Design and Technology project for my Higher School Certificate www.ecosureblog.net
Another approach is to use the upper half of a 64K EEPROM but only a chunk at a time.· You don't want to use an EE location counter because that will wear out in 500K cycles (I've seen EE do this so it is no lie).· But you can say, all unused EE in the upper half will be 0xFF except for the block that's in use, which will always start with 0x00.· When the Prop boots search the upper half of EE·for this marker, and create it if it doesn't exist.· Then, whenever you save changes, write the new values to the next possible location, wrapping around when you hit the end of the upper half,·and write the old values in the old location to 0xFF.· If you need 128 bytes of status, this will increase your EE life expectancy from 500K to 500K * 32K / 128 or over 120,000,000 cycles.· In many applications that can be the difference between periodic field replacement and de facto permanence.
and then I could change it using some code to overwrite the current data in EEPROM by referencing the start address
If the variables aren't predefined in SPIN, how do I reference them?
Thank you
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"powered by Propeller" domed stickers $1.50 - Find them here
Check out my Design and Technology project for my Higher School Certificate www.ecosureblog.net