Electronic – How to simulate a real inverter

digital-logiclogic-gatesltspicenot-gate

I'm new to digital electronics and I want to simulate in ltspice a circuit which contains a couple of 74LS04 inverters. What represents the "Test conditions" under the switching characteristics in the datasheet? All I have understood so far is that this inverter (being a non-ideal one) has propagation times. What are all the differences from the ideal inverter? What I have to modify in ltspice in order to simulate this inverter?

You can find the datasheet here: http://www.ti.com/lit/ds/symlink/sn74ls04.pdf

Thanks for help!

Best Answer

Place the inverter (from the digital tree)

Right click on the device to bring up the parameters window:

LTSpice Inverter with parameters

Double click on the Value line to edit the contents. I have done that for you in this case as the td value is somewhat undocumented.

The td value is the propagation delay, Vhigh is the power (5V for your device) and Vref is the switching threshold (set to the usual 1.4V at room temperature for TTL). If Vref is omitted, it is calculated as (Vhigh - Vlow) / 2

Vlow defaults to 0V.

There are other parameters you can set - see the LTSpice help.

[Update]

As I can only set one delay time, I took the longest (they are only 1 nsec different anyway)

The TTL threshold is somewhere between 0.8V and 2.0V and typically ( at room temperature) is two diode drops above ground (so 1.4V).

The rise and fall times default to 0, but you can add tr= and tf= using the same syntax as td.