jodicalhon
New Member
I'm writing a program that saves some phrases to eeprom, that are then displayed at appropriate times on an LCD. The 'write to eeprom' instructions are at the start of the program, before the main program begins. I'm using an 18A.
It struck me that once the phrases are written to eeprom the first time, at the initial download of the program, that the job is then done and they shouldn't have to be written there again, as they'll be retained in memory at power-down.
As it is, though, they'll be re-written to eeprom every time I run the program. Although I don't think I'll wear out the eeprom, it does seem somewhat pointless.
Is there a simple way to avoid this?
I've thought of setting a flag, perhaps by writing a 1 to eeprom 0 after the phrases are written, at the initial download. The first instruction in the program would then be to read the flag and, if it's set, skip the writing of the phrases.
Have I lost the plot?
It struck me that once the phrases are written to eeprom the first time, at the initial download of the program, that the job is then done and they shouldn't have to be written there again, as they'll be retained in memory at power-down.
As it is, though, they'll be re-written to eeprom every time I run the program. Although I don't think I'll wear out the eeprom, it does seem somewhat pointless.
Is there a simple way to avoid this?
I've thought of setting a flag, perhaps by writing a 1 to eeprom 0 after the phrases are written, at the initial download. The first instruction in the program would then be to read the flag and, if it's set, skip the writing of the phrases.
Have I lost the plot?