I'm experimenting with CMOS logic gates and have encountered something I am having a hard time understanding.
When I make an inverter using ideal components and measure the output, it works exactly as you'd expect (inverts the signal).
Then, when you load it with the LEDs, it cannot hold that voltage. Again I expected this
However now when I replace the mosfets with real models, it now works as if it was unloaded?
By default, LTSpice sets Rds to 0 for the mosfets, so the output impedance from the gate is 0. The input impedance to the LED circuit is infinitely high in comparison. For this components, Rds is in the mohms, a higher output impedance.
Based on the input/output impedances, I would expect the gate with ideal components to be fine under load (0 output impedance), and the circuit with real components to have the problem. The same thing occurs with my CMOS AND and CMOS OR gates. So why does this appear to be backwards and then do I need a digital buffer (2 NOT gates) or not?
Vto
andKp
with a.model
statement. If you want an ideal MOSFET (for switching), it's best to use the voltage controlled switch (symbol namesw
) withRon
set to something like1m
andRoff
set to something like1g
. Make sure you setVt
too. \$\endgroup\$