eeprom what is power-cycles
Hi,
I am using 8052 for my own hobby project.
In my project, I need to maintain an array index which will be maintained by the system as long as a power is supplied to it. The index will monotonically increase with time, say for example once a day.
However, after a reset or a power cycle when my program starts to run again, it should "remember" the last value of the index and should continue execution from that point onwards.
Since, I would need to write to this variable, it definitely cannot be in ROM.
Shall I use NVRAM or similar battery backed up memory?
Problem is, I just need a 2 byte wide variable. So for just 2 bytes, is it worth buying a NVRAM memory chip? Please advise.
regards,
Seemanta