Retrieve variable from EEPROM

I am using atmega2560 and codevision.I am saving an EEPROM variable. I want to get this information for analysis.

Question is, How do I retrieve my variable for analysis in Codevision from the Chip?

thanks.

How are you saving your data to EEPROM? Via the inline functions defined in /avr/eeprom.h ?

eeprom_read_byte eeprom_write_byte

FWIW they are what the Arduino EEPROM library use

Cheers,

AFAIK it can’t be done directly,

  • You might have a EEPROM dump sketch that can be uploaded to dump the EEPROM over Serial. Allways handy such sketch.

  • Another option is to build in a debug mode in your sketch that can be started with a keypress or so.
    The latter influences the performance of the sketch only minimal just to check for the keypress and it prevents zillion times uploading the dumpsketch. However you must have enough memory for the debug() function and when in debug mode your main sketch will stall.

loop()
{
… // all your code

if (digitalRead(DEBUGPIN) == HIGH) debug();
}

void debug()
{
// dump / do what is needed ,
}

You simple need to create/write a simple function in your sketch that reads the eeprom variable(S) and sends them out the serial port to your PC for analysis. Then have a on/off switch wired to a spare digital input pin and have your sketch test the status of the switch and call the function if it's turned on.

Lefty