EEPROM (beginners question)

After some weeks of programming the wonderful DUE, I have two (perhaps simple) problems:

  1. The DUE shall permanently store und run the uploaded Programm itself even after current was cut off. How to reach this?
  2. When 1. will be o.k, I must change a few data values within the program by serial monitor. My problem is not the necessary program part, but : This changed values shall also be stored permanently to be used by the running program.

Can anyone give me some hins?
Thanks

  1. The code you upload to the Arduino is stored in flash memory so it will always run the code you program when you power it off and power it back on.

  2. This is where you need to write and read to the EEPROM when your program is running, check out the example eeprom_write and eeprom_read that comes with the Arduino software. You just need to tell which location of the EEPROM to write and read from.

Bad news... The ArduinoDue has no EEPROM. Thus, you can't store values permanently. It is possible to write persistent values to FLASH memory just like your program but such values will be erased the next time you flash a program to the Due. Most of us just add an I2C connected EEPROM to our designs somewhere.

Thanks to Collin80 and electricteardown.
That's just I wanted: Short and precise.