Skip to main content
2 of 5
added 1282 characters in body
Scott Seidman
  • 30.6k
  • 4
  • 46
  • 114

You need a retriggerable one shot followed by an inverter.

The 74HCT123 (truth table is shown below) is one such integrated circuit – a retriggerable monostable multivibrator. It's available for many logic families (e.g., 74LS123).

enter image description here

Note that there are many modes in which you can use this integrated circuit, and three of them produce timed pulses in response to rising or falling edges (i.e., the rows with up or down arrows).

“Retriggerable” means that the output of the integrated circuit will remain high so long as the input sees triggers before the output returns to a low value. As you can see from the example timing diagrams that follow, after a rising edge on the input, the one-shot produces an output pulse and then goes low tw after the input rising edge (if the inputs are so configured), unless before time tw another rising edge is provided, in which case the output stays high until tw following the last rising edge. enter image description here

So, you just put your PWM signal in to the one-shot, with the width set longer than the PWM period, and you generate a signal that stays high until the PWM is over. You send that through a simple inverter.

Scott Seidman
  • 30.6k
  • 4
  • 46
  • 114