Trying to understand the SPICE output for this basic MOSFET circuit:
The input (left) is a crude square wave:
A simple spice simulation shows the output voltage (right) as follows:
Why does the capacitor level off at 7V? My thinking was that as it charges up, the current through the transistor would decrease until VDS = 0, and at that point the voltage across the capacitor would be 9V, but SPICE thinks differently.