Re: Using EEPROM in AVR
using Eeprom for a variable that should be changed anytime in chip program is not a good way !!!
you'd better use a backup battery and use RAM .
you also can use high capacity capacitors used except battery ! they are smaller . don't forget to make your MCU in lowest power using mode when going off !
i say it because eeprom has a life wich maybe finished during MCU working if you write on it too many times ... !then your device wouldn't work , i haven't worked with C language , but i think it is not possible to declare a variable in eeprom usually , you should write subroutines wich saves and reads that eeprom address as variable , you also shuold take care of programming time needed for eeprom ! it is not as fast as RAM is ! it takes some mili secondes depending upon different conditions ( voltage ... ) you can get more informatin from the chip datasheet .