Home    Master Clock   LCD Master Clock    Kenley Weather






Arduino EEPROM Erase


Clearing your EEPROM

If your DCF77 library held on your Arduino has become corrupted the Arduino will not "Synchronize" to a good signal and will display a low "Signal Quality %" even though the signal is perfect.

Load this small bit of code to your Arduino to erase the EEPROM then reload your original clock code.



 * EEPROM Clear
 * Sets all of the bytes of the EEPROM to 0.
 * Please see eeprom_iteration for a more in depth
 * look at how to traverse the EEPROM.
 * This example code is in the public domain.

#include <EEPROM.h>

void setup() {
    Iterate through each byte of the EEPROM storage.

    Larger AVR processors have larger EEPROM sizes, E.g:
    - Arduno Duemilanove: 512b EEPROM storage.
    - Arduino Uno:        1kb EEPROM storage.
    - Arduino Mega:       4kb EEPROM storage.

    Rather than hard-coding the length, you should use the pre-provided length function.
    This will make your code portable to all AVR processors.
   Serial.println("Ready");// displays Ready then shows progress on serial port
   Serial.print("EEPROM Size ");
  for (int i = 0 ; i < EEPROM.length() ; i++) {
    EEPROM.write(i, 0);


void loop() {
  /** Empty loop. **/