摘要 |
PURPOSE:To restore the storage contents after the power source recovers even in case of a long-time power failure by setting a time for which the storage contents are held by a battery in case of a power failure and saving the storage contents when the power failure continues for longer than the set time. CONSTITUTION:If the electricity supplied to a terminal 11 fails, a detecting circuit 1 detects that and a changeover switch 2 is automatically switched to a side 2b with its detection signal to supply electric power from a backup battery 10. Further, the output of the detecting circuit 1 is sent to a CPU 6 and a timer 3; and the CPU stops operating and the timer 3 begins to measure the time. A comparing circuit 5 compares the time of the timer 3 with a time set by a user and sends an interrupt signal to the CPU 6 once detecting the time of the timer 3 exceeding the user's set time. The CPU 6 saves the contents of a memory 7 to an NVM 8 with the interrupt signal. When the power source recovers, the contents of the NVM 8 are transferred to the memory 7 and written back to an external storage device. |