Go Down

Topic: Upload to EEPROM used by EEPROM library? (Read 733 times) previous topic - next topic



I have made a simle rpm counter for an engine presenting data with big fonts on an 4x16 lcd. One of the "features" of the software is to all the time keep track of the total run time for the engine over all runs. That is stored into EEPROM as the arduino will be switched off between the runs.

However, when new features will be added or (hopefully not  ::)) bugs found and corrected, the stored total time will be erased/overwritten when the new software is uploaded.

Is there some way to also upload data to the specific EEPROM positions used by my software?


How comfortable are you working with a command line program, far outside of the Arduino IDE?

There is a program that can do what you want to do, but you will be getting yourself into a more highly technical environment.

Take a look at AVRDUDE.
AVRDUDE can be used effectively via the command line to read or write all chip memory types (eeprom, flash, fuse bits, lock bits, signature bytes) or via an interactive (terminal) mode. Using AVRDUDE from the command line works well for programming the entire memory of the chip from the contents of a file, while interactive mode is useful for exploring memory contents, modifing individual bytes of eeprom, programming fuse/lock bits, etc.

Take a look at its documentation, and if you are not frightened by the possibility you can brick your MCU, have a try with it.


Aug 12, 2009, 07:49 am Last Edit: Aug 12, 2009, 08:03 am by TBAr Reason: 1
On second thought, a far easier way to maintain your data is to have a function that initializes your EEPROM bytes to their last valid values. Use a special button or switch, and call that function when the button is pressed.

As long as you are changing source code for one reason or another (new feature or bug fix), just code the value for the stored total time in the source code for that function, and remember to change that value when you change other parts of your code.


Tanks for the answer!   :)
Your second reply will probably be the used one. I have had some similar fallback thoughts and it will most likely be the easiest solution as I have free pins.
Still I will have a look at AVRDUDE as it seems quite nice anyway.

Go Up