Hi,

You also could dectect the mains voltage drop on an "interrupt" pin and, with a suitable supercap to allow some time to put your values into the EEPROM ...save them before power definitly off.

depends on what you intend to do ... and we don't know anything about your project !!!!

Alain