5
\$\begingroup\$

I have an AVR code where I store data in EEPROM, this data is actually some settings and USER phone numbers. These are quite often accessed. So I planned to read all the values at start-up to memory at the start-up. and then use only those values instead of reading them from EEPROM whenever required. This method is OK but it uses a lot of data memory. So now my plan is to read from EEPROM whenever I need to use that variable. Is this OK, will it affect the EEPROM???

\$\endgroup\$
  • 1
    \$\begingroup\$ The eeprom wears only when you write to it, you can read it unlimited times without any problem. \$\endgroup\$ – alexan_e May 3 '14 at 8:25
  • 1
    \$\begingroup\$ @alexan_e How fast is reading from EEPROM compared to reading RAM? Can it slow down the program too much? \$\endgroup\$ – motoprogger May 3 '14 at 16:12
  • \$\begingroup\$ RAM access is the fastest, flash is slower and eeprom is even slower, but for specific timing you should probably check the datasheet or try the Atmel studio simulation and compare results. \$\endgroup\$ – alexan_e May 3 '14 at 22:39
8
\$\begingroup\$

What you're planning is fine, only writing (or more specifically usually erasing) data causes endurance issues with an EEPROM. There's a related question How does memory wear out? that goes into some more details of what causes that effect.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.