will EEPROM keep values after reprogramming?

Hi,

If I write values to the atmega's EEPROM, can I read them after I have reprogrammed the chip with another program more designed for reading and printing the eeprom values?

Joachim

According to the design indicated in the ATmega382 datasheet the EEPROM should be stored and accessed in a completely different location from the flash programmable memory.

But if its critical data, do a test first.

Data sheet link: http://www.atmel.com/dyn/resources/prod_documents/doc8161.pdf

thnx, not very critical...

Joachim

It is a physically separate memory. I've never tried, but I think I read somewhere you can program the EEPROM through the programmer but if you don't, it should stay unchanged.

In any event, as far as I know, the Arduino bootloader should not alter the EEPROM.

If I write values to the atmega's EEPROM, can I read them after I have reprogrammed the chip..

Yes, it will be retained also after you upload a new sketch when using the standard Arduino IDE configuration.

The Arduino bootloader (in its most recent incarnation) can alter/program EEPROM, but will only do so if you manually start the uploader (avrdude) and instruct it to do so.

If you upload a new sketch through an external programmer (e.g. AVR ISP, STK500 etc.), the default behavior however is to erase the chip (flash and eeprom) prior to programming. There is however a fuse setting available (on the ATmega's) that can be enabled so that EEPROM is preserved through the erase cycle.