PURPOSE: To prevent erroneous data from being inputted in the event of a malfunction of a counter, by providing a means for detecting the malfunction of the counter due to an external noise, etc., and a means for initializing the counter.
CONSTITUTION: In case when an abnormal clock 12a is outputted due to an external noise, etc., a clock 12 is not outputted by a constant period, therefore, before eight clocks are inputted, an output of a one shot multivibrator 1 becomes logical "0". Also, since eight clocks are not inputted, an output D of a counter 2 is also logical "0". As a result, an output of an OR circuit 4 becomes logical "0", and an output of an AND gate circuit 6 also becomes logical "0" therefore, a reset signal 16 is inputted to the counter 2, and the counter 2 is initialized.