In my circuit I have a comparator which compares the output of a sine wave with a staircase wave, if the staircase is above the sine wave, I wish to use a Mosfet in its cut off mode which will allow the capacitor to full discharge. I have hooked up the output of the comparator to the gate of the Mosfet as shown. My problem is that the output of the comparator switches back to low almost immediately as the staircase function drops below the sine wave. I was wondering if there was a way to generate a pulse which stays put until the capacitor is 0, or a fixed period of time.
Edit: I am unable to use digital components.