The 4046/74HC4046 PLL simulation model is a hard-to-find item. It seems that only Orcad/Cadence have it, and only for full-license customers (the 30-day trial version brought no joy).
I finally found a PSpice model, and it looks promising.
However, something is missing, which as far as I can see are the pin associations between the Spice model and the Eeschema symbol.
I attach the model here for reference: CD_4046_original.lib (4.8 KB)
So how do I establish a connection between the model and the schematic?
I’ve considered two approaches:
1- make a custom symbol using the pin names in the PSpice model.
2- modify the model… I’m leery of that, I know when I’m out of my depth.
But for option 1, I’m not certain whether Eeschema just transfers the pin numbers to ngspice, or if the pin names can be used as well.
Or for option 2, whether there’s a way to add the pin numbers to the model.
All help is highly appreciated, also references to relevant ngspice resources.
I’m still on V6, I’m trying to avoid having several construction sites at once.
My ngspice is probably v31.3 (this is info from my Muon package manager). EDIT: not true. The version used by V6 is a great secret. Dunno why.
I think I’ve solved the pin numbering issue, not certain, though. From some tutorial, the pin names in the .subckt line should have a sequence corresponding to the 1 2 3 … 16 pin numbers. I’ve rearranged them in that way:
Editing the model is possible as well, but has some risks for introducing bugs.
An update to ngspice-39 is possible. If you were on MS Windows, I could give you some advice. On Linux the location of ngspice and the version bundled with KiCad depend on the package manager of the Linux distribution chosen. This is absolutely not under my control nor under control of the KiCad develeopers. There is no guarantee that KiCad 7 comes with ngspice-39. When your package manager offers ngspice-31, this is completely outdated. However KiCad uses its own bundled ngspice version, not standard ngspice. Therefore the update requires having ngspice-39 available and knowing where to replace the ngspice files used by KiCad.
Yeah, I tested with the alternate node sequence with the same (non-) results.
But my initial question on the connection between symbol pins and the .subckt signal names I found the answer to by chance. This is apparently too basic/simple to be included in the documentation.
I found the ngspice version number, it’s 38, so no cigar… I’m on Linux, BTW.
The model seems to be from 1998, but ngspice still doesn’t not support the “U” functionality? Wow.