misconfiguration problem with EEPROM

I do not think the microcontroller had used before.
It might have EEPROM saturated at write many times when you run out of battery,where it is installed the battery is not stable.
Of switch-on problem can not be because what I have fed 5 A 12VDC regulated.
Also I attached my program eeprom.
I've found where is attached, thanks.

best regards

EEPROM_16_01325.ino (32.1 KB)