摘要 |
PURPOSE:To prevent the signal to be outputted in relation to a count value from chattering by judging the relation of the count value and the prescribed range of a count means, and holding and outputting the outputted signal when the count value is within the prescribed range. CONSTITUTION:A pulse signal SP to be outputted from a light receiving element is inputted as a count object in a counter 2 via a gate circuit 1, the count value of the counter 2 is inputted in a CPU 3 and the data of a memory 4 is inputted in the CPU 3. The counter 2 counts the pulse of a prescribed pulse signal. When the counted count value exceeds a prescribed range, a first signal is outputted. When the value is below the prescribed range, a second signal is outputted. When the counted count value is within the prescribed range, the signal outputted according to the count value is held and is outputted. Therefore, even if the pulse of the pulse signal is omitted due to the generation of noise, etc., the signal is prevented from chattering without changing the signal outputted according to the count value. |