.lib files in Kicad nightly builds

i am unable to use the correct .lib file for the models used in kicad.
For eg : in library 74xGxx library if I want to use 74AHC1G00 which is a nand gate I am not able to add library file and tthe circuit is not giving correct result.similarly with all other components in 74xgxx library.Kindly tell me how to add the correct .lib file for model to work
74xGxx.lib (37.8 KB)

Is this the same simulation question again?

Same answer as before, there are no simulation models provided for any logic symbols in the official KiCad libs. You will either need to find models from the web or create your own models.

As it happens, I am just now looking into how to create subcircuits to simulate logic gates.

Thank you if you are able to figure out d flip flop or 555 timer it would be very helpful.I will also be trying the same.If you have any material to learn to generate subcircuit kindly share as it would be very helpful

There is an example circuit in the ngspice manual, Chapter 21.6 Four-Bit Binary Adder (MOS) ngspice.sourceforge.net/docs/ngspice-manual.pdf [at time of writing Sourceforge is offline for maintenance].

I would strongly recommend installing standalone ngspice and running that directly instead of going via KiCad. [when Sourceforge is back] ngspice is well documented and actually quite easy to use once you get the command line interface. The KiCad is interface is still quite new and not widely documented yet, so is an extra layer of complexity to deal with. The documentation will get better when KiCad v5 is released (August will be soon :wink: )

1 Like

I have published some simulation examples on my github https://github.com/bobc/kicad-simulation-examples.

There are spice models for:

  • inverter (NOT gate)
  • NAND gate
  • 3 input NAND gate
  • D latch
  • D flip-flop

These should be used with the corresponding KiCad symbols in sim_logic.lib :

  • CMOS_NOT
  • CMOS_NAND
  • CMOS_NAND3
  • D_LATCH
  • D_FLIPFLOP

I haven’t implemented all possible examples or done much verification, they are provided on “as is” basis, use at own risk blah blah. The projects should work with KiCad inbuilt ngspice as well as standalone ngspice if exported as spice netlist.

[updated : now should work out of the box with relative paths to spice library files]

@Joan_Sparky @Rene_Poschl I think this thread should be in “simulation” category.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.