摘要 |
PURPOSE:To avoid trouble due to the malfunction of write by detecting power- off to correct the counted value during the operation of write to an E<2>PROM in accordance with coincidence or noncoincidence among corrected values in three storage areas for correction. CONSTITUTION:A CPU 11 reads/writes the counted value from/in an E<2>PROM 13 through an I/O port 12. A counted value storage area where the counted value is preliminarily preserved and storage areas for correction where corrected values are preserved are set in the storage area of the E<2>PROM 13. It is detected whether the power source is turned off during the operation of write to the E<2>PROM 13 or not in accordance with coincidence or noncoincidence among corrected values preserved in three storage areas for correction; and if it is detected that the power source is turned off, the counted value erroneously written in the counted value storage area by power-off is corrected based on corrected values preserved in three storage area for correction. Thus, trouble due to the malfunction of write to the E<2>PROM 13 which is caused by power-off is avoided. |