Data is stored in a non-volatile memory such as a flash memory. The
non-volatile memory has two memory areas. When power of a device is
turned on, data in the two memory areas are compared to determine which
memory area includes old data, and the old data is erased. When the power
is turned off, a control setting of the device used immediately before
the power is turned off is stored as new data in the memory area from
which the old data is erased. When the power is applied again, the new
data is read, and the control setting is restored in the device.