So you want the output to promptly fall to a constant non-zero value.
Parallel resistor and capacitor in series with the input and a resistor to ground. The ratio of the two resistors sets the persistent voltage and the capacitor defines the initial fall time constant.
I am simulating the circuit in LTspice - got the previous questions sorted so thank you all.
But, how come there is a large voltage spike where the cap charges up and discharges? (1st picture)
I have managed a work around (2nd picture) but I would like to know what's going on.
Is it the software: the fact I have set the voltage source to have a very fast rise and fall time (not like what I would really get from my function generator in real life).
Would I see this spike in a practical setting please?
Tom it is just a challenge/helping a friend out - and I am trying to learn more about electronics, so I can apply this to anything I might need to down the line.