PURPOSE: To prevent the deterioration of the data holding time characteristics of a nonvolatile memory and at the same time to simplify a power supply cut-off detecting part, by providing a discrimination flag and decreasing the number of times of writing of data to the nonvolatile memory.
CONSTITUTION: A discrimination flag is provided to a nonvolatile memory 14 to decide whether the preceding process is equal to a reading or writing action. Then the using data of a CPU12 is written to a nonvolatile memory 14 via a back-up power supply circuit 5 which is cut off later than a main power supply only in case the main power supply +B(12) fed from a battery 1 is cut off, and at the same time the flag shows a write mode. In this case, the flag is also written and discriminated by the CPU12. In such a way, the double writing of the same data is prevented and therefore decreases the writing times. Thus it is possible to prevent the deterioration of the data holding time characteristics and also simplifies a power supply cut-off detecting part.