# How to simulate a real inverter?

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!

• "Test conditions" is simply what the name says: the conditions under which the IC was tested when measuring the characteristics mentioned in the datasheet. Rl means Rload or a load resistor (to ground) at the output. Cl means a load capacitor. Apr 4, 2016 at 13:50
• Do you mean something like this? imgur.com/se1af0a Apr 4, 2016 at 14:04
• Not exactly, in your example there's only a resistor to ground at the output. In the datasheet's test there is also a capacitor (which is more important as it determines part of the delay of the gate). Apr 4, 2016 at 14:36

## 1 Answer

Place the inverter (from the digital tree)

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

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.

• In the datasheet there are 2 values for the propagation times: $$T_{pLH} = 9ns$$ and $$T_{pHL} = 10ns$$ so I guess that td is correct set. Why is the threshold set at 1.4V? It does not depend on the information from the datasheet, such as HIGH Level Input Voltage or LOW Level Input Voltage? Apr 4, 2016 at 14:07
• Fall time and rise time are 0? Why? Apr 4, 2016 at 14:19
• Why is the threshold set at 1.4V? You can set it so 1.5 V, see page 8 of the datasheet. But maybe in a datasheet of a different manufacturer of the 74LS04, it might be 1.4 V. The exact value does not matter much. Apr 4, 2016 at 14:35
• Whether you need external diodes is application dependent. Apr 4, 2016 at 16:30