Another solution (with absolutely no pulse shaving) is to use a positive edge-triggered D FF with the long pulses going to the D input and the short pulses inverted and going to the CLK input (you could skip the inverter if you used a negative edge-triggered FF).
The FF Q output goes to one input of a two input AND gate with the short pulses going to the other input.
The AND gate will then open at the fall of the first short pulse after the long pulse goes high.
This insures the first short pulse is always complete.
The gate closes at the fall of the last short pulse after the long pulse goes low.
This insures that the last pulse is also not truncated.
The one possible disadvantage to this solution is that there can be nearly one short-pulse-period delay before the first short pulse appears at the gate output, depending upon the relative phase between the short and long pulses.
The FF Q output goes to one input of a two input AND gate with the short pulses going to the other input.
The AND gate will then open at the fall of the first short pulse after the long pulse goes high.
This insures the first short pulse is always complete.
The gate closes at the fall of the last short pulse after the long pulse goes low.
This insures that the last pulse is also not truncated.
The one possible disadvantage to this solution is that there can be nearly one short-pulse-period delay before the first short pulse appears at the gate output, depending upon the relative phase between the short and long pulses.
Last edited: