Author Topic: Spice Model for 74HC123, 74LS123 for LTSpice  (Read 16105 times)

0 Members and 1 Guest are viewing this topic.

Offline takedaTopic starter

  • Newbie
  • Posts: 9
  • Country: gr
Spice Model for 74HC123, 74LS123 for LTSpice
« on: April 30, 2018, 11:19:28 am »
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?
 

Offline nrxnrx

  • Supporter
  • ****
  • Posts: 68
  • Country: ro
Re: Spice Model for 74HC123, 74LS123 for LTSpice
« Reply #1 on: April 30, 2018, 04:03:49 pm »
A lot of ltspice models can be found at https://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.
« Last Edit: April 30, 2018, 04:05:50 pm by nrxnrx »
 
The following users thanked this post: Zero999, RoGeorge

Offline takedaTopic starter

  • Newbie
  • Posts: 9
  • Country: gr
Re: Spice Model for 74HC123, 74LS123 for LTSpice
« Reply #2 on: April 30, 2018, 06:59:28 pm »
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 error

Of 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.
 

Offline takedaTopic starter

  • Newbie
  • Posts: 9
  • Country: gr
Re: Spice Model for 74HC123, 74LS123 for LTSpice
« Reply #3 on: April 30, 2018, 07:09:28 pm »
I found some other libs and tried to import the same way, no succes (attached image)

 

Offline nrxnrx

  • Supporter
  • ****
  • Posts: 68
  • Country: ro
Re: Spice Model for 74HC123, 74LS123 for LTSpice
« Reply #4 on: April 30, 2018, 07:30:52 pm »
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.
 

Offline purza

  • Newbie
  • Posts: 1
  • Country: us
Re: Spice Model for 74HC123, 74LS123 for LTSpice
« Reply #5 on: November 20, 2018, 12:08:14 am »
Late to the party.... had the same problem as Takeda.  Fixed by adding a spice directive   .include 74hc.lib
 

Offline neptune1000

  • Newbie
  • Posts: 1
  • Country: in
Re: Spice Model for 74HC123, 74LS123 for LTSpice
« Reply #6 on: September 24, 2019, 03:33:08 pm »
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?
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19485
  • Country: gb
  • 0999
Re: Spice Model for 74HC123, 74LS123 for LTSpice
« Reply #7 on: September 24, 2019, 09:07:42 pm »
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?
Are you talking about the 74HC4051? Please provide more information.
 

Offline IconicPCB

  • Super Contributor
  • ***
  • Posts: 1534
  • Country: au
Re: Spice Model for 74HC123, 74LS123 for LTSpice
« Reply #8 on: September 25, 2019, 12:32:02 am »
If of any use

CD4000.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.
 
The following users thanked this post: Zero999, MathWizard

Offline hrm

  • Newbie
  • Posts: 3
  • Country: bg
Re: Spice Model for 74HC123, 74LS123 for LTSpice
« Reply #9 on: May 07, 2022, 01:49:11 pm »
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!
« Last Edit: May 07, 2022, 03:54:04 pm by hrm »
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19485
  • Country: gb
  • 0999
Re: Spice Model for 74HC123, 74LS123 for LTSpice
« Reply #10 on: May 07, 2022, 02:09:03 pm »
Hi!

I want to simulate 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!
Please 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.
 

Offline hrm

  • Newbie
  • Posts: 3
  • Country: bg
Re: Spice Model for 74HC123, 74LS123 for LTSpice
« Reply #11 on: May 07, 2022, 03:52:23 pm »
I mean that I want to connect Vcc to 2.5V and Vee to -2.5V relative to ground.
 

Offline ledtester

  • Super Contributor
  • ***
  • Posts: 3034
  • Country: us
Re: Spice Model for 74HC123, 74LS123 for LTSpice
« Reply #12 on: May 10, 2022, 03:14:55 am »
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.

 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19485
  • Country: gb
  • 0999
Re: Spice Model for 74HC123, 74LS123 for LTSpice
« Reply #13 on: May 10, 2022, 06:44:16 am »
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.
« Last Edit: May 10, 2022, 06:48:07 am by Zero999 »
 

Offline hrm

  • Newbie
  • Posts: 3
  • Country: bg
Re: Spice Model for 74HC123, 74LS123 for LTSpice
« Reply #14 on: May 10, 2022, 09:53:54 am »
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)

 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19485
  • Country: gb
  • 0999
Re: Spice Model for 74HC123, 74LS123 for LTSpice
« Reply #15 on: May 10, 2022, 10:28:07 am »
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?
 

Offline ledtester

  • Super Contributor
  • ***
  • Posts: 3034
  • Country: us
Re: Spice Model for 74HC123, 74LS123 for LTSpice
« Reply #16 on: May 10, 2022, 02:45:49 pm »
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.

Being 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: [Select]
Version 4
SHEET 1 880 680
FLAG 176 128 0
FLAG 288 128 myflag
SYMBOL res 160 32 R0
SYMATTR InstName R1

and:

flagtest2.asc:
Code: [Select]
Version 4
SHEET 1 880 680
FLAG 176 128 myflag
FLAG 288 128 0
SYMBOL res 160 32 R0
SYMATTR InstName R1

Ground 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.


 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19485
  • Country: gb
  • 0999
Re: Spice Model for 74HC123, 74LS123 for LTSpice
« Reply #17 on: May 10, 2022, 05:26:19 pm »
I missed the obvious: the NAND is being used as a buffer, so can be simplified.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf