Loading...
Pages: [1]   Go Down
Author Topic: will EEPROM keep values after reprogramming?  (Read 419 times)
0 Members and 1 Guest are viewing this topic.
Moss
Offline Offline
Full Member
***
Karma: 1
Posts: 119
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 20
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

0
Offline Offline
Newbie
*
Karma: 0
Posts: 20
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Moss
Offline Offline
Full Member
***
Karma: 1
Posts: 119
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

thnx, not very critical...

Joachim
Logged

0
Offline Offline
God Member
*****
Karma: 2
Posts: 849
Arduino rocks!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
God Member
*****
Karma: 3
Posts: 985
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Code:
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.

Logged

Pages: [1]   Go Up
Print
 
Jump to: