How to convert a changing input (square wave) into a single high signal

frequencypulsesquarewaveform

I am designing a circuit which will output a square waveform for a specific duration of time (t) but I need to be able to read the square waveform using a processor so would like to turn the changing square waveform into a single high pulse for time (t). The frequency of the waveform could be too high for the processor to read directly so I am looking for a method to convert it to a single high pulse (with duration t). I first thought about using a small capacitor which would be charged up during the rise of the square waveform and then be discharged through the low part of the waveform but I am unsure if this would work and what value the capacitor would need to be. Ideally I need way which does not use ICs (simple discrete components only would be best).
Any ideas?
Dan

Best Answer

You need a retriggerable one-shot, like the 74HC423 The first rising edge will make the output high, and each subsequent rising edge will keep it high. The output will not go low until there is a time period between rising edges that exceed the output pulse width.

In the world of logic chips, one-shots aren't the greatest of ideas, and are considered to be cheats in many cases, but here it seems to make OK sense.

Related Topic