Spice Model for 74HC123, 74LS123 for LTSpice - Page 1
Forum section: electronics / beginners

author: takeda
author_rank: Newbie
timestamp: April 30, 2018, 11:19:28 am
content: I am trying to find a model for 74HC123/74LS123 without any luck.Every model I find online I cannot import to LTSpice.A bunch of errors occur.Can somebody explain how to simulation with LTSPice 47HC123?

author: nrxnrx
author_rank: Unknown
timestamp: April 30, 2018, 04:03:49 pm
content: A lot of ltspice models can be found athttps://groups.yahoo.com/neo/groups/LTspice/files/. You'll need a yahoo account, unfortunately.I've just tested this:I've attached two files downloaded from there (inside a single .zip). I put the contents of 74HC.zip in LTSPICEDIR/lib/sym/74hc/ and the 74HC.lib file in LTSPICEDIR/lib/sub/ .Now I can just hit F2, go into the 74hc directory, pick a device, place it, hit 's', and place a ".lib 74HC.lib" somewhere. It seems to work for me.Please don't be offended by the step-by-step. It's just to make sure that if I'm wrong, we're at least making the same mistakes.

author: takeda
author_rank: Newbie
timestamp: April 30, 2018, 06:59:28 pm
content: Hi,First, thanks, I could not thank you more.But, I did exactly (and the steps required are really helpful) but I get the following errorOf course this is not a real circuit, just to see if It can import it.I wonder why it's so complex this importing thing of LTSpice.

author: takeda
author_rank: Newbie
timestamp: April 30, 2018, 07:09:28 pm
content: I found some other libs and tried to import the same way, no succes (attached image)

author: nrxnrx
author_rank: Unknown
timestamp: April 30, 2018, 07:30:52 pm
content: Right-click on the voltage source (V1) and put something in the "DC value" field.That message is just complaining that you haven't set a value for 'v' for the V1 component.

author: purza
author_rank: Newbie
timestamp: November 20, 2018, 12:08:14 am
content: Late to the party.... had the same problem as Takeda. Fixed by adding a spice directive .include 74hc.lib

author: neptune1000
author_rank: Newbie
timestamp: September 24, 2019, 03:33:08 pm
content: I would like to simulate digital multiplexing in ltspice. i need to know to if that's even possible and if yes then where can i download the neccessary library files from?

author: Zero999
author_rank: Super Contributor
timestamp: September 24, 2019, 09:07:42 pm
content: Quote from: neptune1000 on September 24, 2019, 03:33:08 pmAre you talking about the 74HC4051? Please provide more information.

author: IconicPCB
author_rank: Super Contributor
timestamp: September 25, 2019, 12:32:02 am
content: If of any useCD4000.lib and CD4000.Zip with symbols are available.CD4000 has a fixed 5V supply setting. For adjustable supply voltage use CD4000_V.lib and on Your schematic set up a voltage source with Vdd as output voltage and give it what ever voltage You need.

author: hrm
author_rank: Newbie
timestamp: May 07, 2022, 01:49:11 pm
content: Hi!I want to simulate a schematic with 132 logic, but I need to set both vcc and vee(which will not be connected to ground). Any Ideas how to do it?Thanks!

author: Zero999
author_rank: Super Contributor
timestamp: May 07, 2022, 02:09:03 pm
content: Quote from: hrm on May 07, 2022, 01:49:11 pmPlease elaborate. Note that ground id just the node in your circuit, from where all voltages and currents are calculated relative to. LTSpice requires a ground node to work, even if your real life circuit won't be connected to earth.

author: hrm
author_rank: Newbie
timestamp: May 07, 2022, 03:52:23 pm
content: I mean that I want to connect Vcc to 2.5V and Vee to -2.5V relative to ground.

author: ledtester
author_rank: Super Contributor
timestamp: May 10, 2022, 03:14:55 am
content: Just shift your application's "ground".I presume the models in the CD4000 library assume that the chip's ground is at 0V and that's what's causing a problem.In that case, just create another rail at 2.5V and use that as your application's ground instead of using LTspice's ground symbol.

author: Zero999
author_rank: Super Contributor
timestamp: May 10, 2022, 06:44:16 am
content: Yes, that works. To make the schematic more clear, add a COM note and plot all voltages relative to it.Example using a Schmitt trigger logic gate which I've set to output logic levels 0V and 5V.Create a COM note.Subtract COM from the voltages plotted.

author: hrm
author_rank: Newbie
timestamp: May 10, 2022, 09:53:54 am
content: Thanks for the suggestion - it surely could work, but the problem is that I want to simulate relatively big circuit and it would be more convenient if I didn't have to change all the ground symbols.I cannot understand why wouldn't they make the model the same as most opamps - with vcc and vee exposed. I was wondering if it's possible to edit the .lib file in order to fix the issue.I'm attaching a scan of the schematic - it's working in real life and I lied a bit - Vcc is 3.2V and Vee is -2V. Also I know there probably are a dozen other ways to reduce the 2 NAND Gates to something else(buffer with schmitt input if it existst or two schmitt inverters. Propagation delay probably doesn't matter as much here)

author: Zero999
author_rank: Super Contributor
timestamp: May 10, 2022, 10:28:07 am
content: You said 74HC123 in the original post, yet the schematic shows the 74132. Which is it?LTSpice doesn't have a Schmitt input NAND model, so you need to make your own by combining the NAND with Schmitt buffers, as you hinted at, but it's clunky. Pick your poison.Here's an example which models the 74HC132 quite well. The TTL 74132 has different thresholds, a lower input impedance and output voltages, making it more difficult to model properly.Why are you simulating it?

author: ledtester
author_rank: Super Contributor
timestamp: May 10, 2022, 02:45:49 pm
content: Quote from: hrm on May 10, 2022, 09:53:54 amBeing text files I think it's really easy to modify all of the grounds in an .asc file.Consider the following two .asc files:flagtest.asc:Code:Version 4SHEET 1 880 680FLAG 176 128 0FLAG 288 128 myflagSYMBOL res 160 32 R0SYMATTR InstName R1and:flagtest2.asc:Code:Version 4SHEET 1 880 680FLAG 176 128 myflagFLAG 288 128 0SYMBOL res 160 32 R0SYMATTR InstName R1Ground symbols are a FLAG with the last parameter set to "0" and other labels are FLAG directives with the name of the label as the last parameter. So you can just do a replacement of "FLAG x y 0" with "FLAG x y newground" to change all of the ground symbols. You can do that with a regular expression substitution, for instance.

author: Zero999
author_rank: Super Contributor
timestamp: May 10, 2022, 05:26:19 pm
content: I missed the obvious: the NAND is being used as a buffer, so can be simplified.