This circuit filters noise, such as glitches and contact bounce, from digital signals. You can easily adjust the circuit for a wide range of noise frequencies. The circuit`s output changes state only if the input differs from the output long enough for the counter to count eight cycles. If the input changes before the counter reaches its maximum count, the counter resets without clocking the output of flipflop, IC2.
You use R2 to set the frequency of the two-inverter CMOS oscillator, which clocks the counter. Simply adjust the oscillator such that its period is one-eighth that of the noise you want to eliminate.