Pages: [1]   Go Down
Author Topic: Upload to EEPROM used by EEPROM library?  (Read 438 times)
0 Members and 1 Guest are viewing this topic.
Stockholm, Sweden
Offline Offline
Newbie
*
Karma: 0
Posts: 5
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

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  :smiley) 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?
Logged

0
Offline Offline
Sr. Member
****
Karma: 0
Posts: 388
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Quote
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.
Logged

0
Offline Offline
Sr. Member
****
Karma: 0
Posts: 388
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: August 12, 2009, 01:03:46 am by TBAr » Logged

Stockholm, Sweden
Offline Offline
Newbie
*
Karma: 0
Posts: 5
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Tanks for the answer!   smiley
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.
Logged

Pages: [1]   Go Up
Jump to: