A typical way that I use in my codings
At power on
if EEPROM_Magic <> $1234 then
' store initial defaults to EEPROM (as many as you need)
EEPROM_Magic = $1234 ' indicate I have valid readings here
' and save all these values to the eeprom
endif
' Now load the EEPROM values and continue with program
EEPROM_Magic is a word sized variable that is saved in EEPROM and contains a magic number that you choose(1234 Hex here)
Regards
Bookmarks