摘要 |
PURPOSE:To make it possible to operate a clock even in case of power failure by a method wherein a specified program is run before power failure in order to measure a unit of time, and in case of power failure, a clock is operated according to said unit and the number of time of running the specified program. CONSTITUTION:A specified program, which executes and terminates a command in a definite period of time, is run in order to count the number of times of running within a given period of time according to a commercial AC frequency. Said measured value F0 is stored in the data area of a memory 2. Said measurement is that of the oscillation frequency of an oscillation circuit 3. When a commercial AC supply source 4 is being supplied, a clock is operated by using the commercial AC frequency as a reference clock, while in case of power failure, the clock is operated by using the oscillation frequency of the oscillation circuit 3 included in a microcomputer 1 itself as a reference clock and the number F0 of times of running measured before the power failure as a unit of time. |