6

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???

dmSherazi
  • 303
  • 4
  • 17
  • 2
    The eeprom wears only when you write to it, you can read it unlimited times without any problem. – alexan_e May 03 '14 at 08:25
  • 1
    @alexan_e How fast is reading from EEPROM compared to reading RAM? Can it slow down the program too much? – motoprogger May 03 '14 at 16:12
  • 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. – alexan_e May 03 '14 at 22:39

1 Answers1

9

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.

PeterJ
  • 17,131
  • 37
  • 56
  • 91