Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • 3
    Personally I think your way is very clean, program an EEPROM bit, set it, and change it after doing a one time initialization. It's also very flexible, in case you want to do it multiple times (just use a counter in EEPROM for example). Or in case the initialization is not done correctly, you can omit resetting the bit. Commented Feb 12, 2019 at 9:23
  • 2
    change the high fuse setting in boards.txt to preserve the EEPROM content at ISP Commented Feb 12, 2019 at 9:49
  • @Juraj The solution with the fuse has worked, although I had to flash it manually through avrdude (D6 instead of DE). Is it normal that changing it in the boards.txt would not update it when flashing (/ flashing using ArduinoISP)? Commented Feb 12, 2019 at 10:16
  • The fuses are only written when you select the "burn bootloader" option in the Arduino IDE. PS You can also use AVRdude to write to the EEPROM directly. Commented Feb 12, 2019 at 11:10
  • see the EEPROM library's eeprom_crc example Commented Mar 20, 2019 at 10:10