How to store a setting ?

I have made a small home automation / alarm system with my Mega 2560.

In the event of a power failure or remote system reset, I need to be able to know what the previous settings were for 4 different integer variables.

At present, I have an SD card and write the settings when they change, and read the settings in the setup code.

However, every few times the SD card fails to initialise.

What alternatives could you suggest to use in place of the SD card ? The 4 variables each change about 6 times per day.

you have an eprom onboard the 328. Why not look into using it. Or look into a serial memory and see if you could get a small non-volitile serial memory to write those values to.

Many Thanks for the info. The EPROM looks like the solution.