HELP!! EEPROM is loosing data !!
i have a problem with EEPROM
i have a voltage stabilizer's circuit controlled by ATMEGA328P.
the problem is :
the eeprom sometimes looses the data stored in it, even though i left the first 99 address empty.
i'm using an isolated SMPS flyback circuit to power the circuit , the attached circuit shows the way i'm using to measure the AC mains voltage, i'm using a voltage divider and LM358 as a buffer.
the 220VAC is wired directly to the board without any isolation and mains neutral is connected directly to the PCB's ground.
i'm wondering if the way i'm using to measure the mains voltage has any thing with this problem!!
So How can i solve this problem?!!
Thank you ALL