PURPOSE: To surely restore the unupdated or updated data even if a power supply is turned off in a data writing state by providing plural storage areas to an EEPROM for the data on a machine device and writing duplicatively the same data in the storage areas or writing endlessly and circularly the continuous data in these areas.
CONSTITUTION: An EEPROM 5 is connected to a computer 2 and includes five areas of different addresses to store the data on a machine device l. When a power supply is turned off and then turned on, a date protection program reads the date on those five areas out of the EEPROM 5 and compares these data with each other. Thus two types of data A and B coincident with each other are detected at two positions together with the discordant data detected at a single position. Then one of both data A and B is copied to all five areas as the restorage date. Thus it is not required to provide a power cut-off detecting circuit at the primary side of a power unit or to provide a capacitor or a boosting circuit of an excessive capacity at the secondary side of the power unit.