add EEPROM read and write, to record the counter even system reset