three simple questions

OK,
1st: if I write a value to EEPROM, say with a sensor calibration, then write a new main program into the ATMega328 with usb or Ftdifriend, the values will still be there and at the same address, correct?

2nd: If I download the 2nd program with an TinyISP or use another Arduino for an ISP, will they still be there?

3rd: If I use the TinyISP, the bootloader that comes on the ATMega328p will be written over, correct?

Don't know why I am worried about this, I just broke the main program with a simple "if" function, and at my blazing 1Hz coding speed it will take a while to fix.

TomJ

  1. If you are programming via a bootloader (which I believe is what you are saying) then the EERPOM is not touched. Any data written is preserved.

  2. Depends on the fuse settings. There is a "preserve EEPROM through chip erase" fuse that has to be set.

  3. Yes.

Thanks Coding Badly,
Think I'll Stick with the bootloader.
TomJ

... broke the main program with a simple "if" function, .... it will take a while to fix

There is some programmers humor in that sentence :wink:

If you need help reviewing what went wrong you can post your code .