I am trying to simulate a CD4093 NAND schmitt trigger. To this end, I have created a symbol with pin names (and numbers) A B Y VCC and AGND. These are the designations I found in the pspice model I downloaded from https://www.ti.com/product/CD4093B#design-development.
The voltage at the supposed input of the schmitt trigger (blue line) is near 8V, the supply of the schmitt trigger, although it should closely follow the green line. This looks like the input of the schmitt trigger actually is its output (Y instead of A or B). So there is a problem with the mapping of the symbol pins to the model.
What is wrong here? I thought given that I use the same names for model and pins, the assignment would be correct.
The first thing that disturbs me is, that you’re using three simulation grounds. What’s wrong with a connection and one ground?
Second thing is: a simulation voltage source is not a power supply. You need VDD and VEE.
Third, your supply voltage seems to something around 8 V (you’ve hidden it, I don’t know why).
That won’t work either.
I suggest that you use the CD4093/4011 from the standard library, copy it to you local library and add the SPICE model to that.
I do have only a single ground net, called ‘0’. I just at one stage was too lazy to add mre GND symbols and drew a wire to connect the other nodes to GND.
Why can a voltage not be used as power source?
Indeed, the supply voltage here is 8V, which is well within the range (3-18V) allowed for this family.
This is the reason I use a 4093 and not a 74HC32.
I think I have in the meanwhile found the problem: Pin names must be numeric.
Indeed the designations (exact node names of the model description) .SUBCKT CD4093B Y A B VCC AGND
prescribe the meanings and the sequence of the nodes, when attaching the model to a symbol.
The standard symbol has its pins with pin numbers (and may be pin names, but these are not important here).
The task is now, when attaching the model to the symbol, to order the pin numbers of the symbol into the sequence prescribed by the model. This is done in the Spice Model Editor’s Alternate node sequence field.
If you create your own symbol, you directly may number the pins according to the spice model, e.g. in1: 1, in2: 2, out: 3 VCC: 4 GND: 5. Then the Alternate node sequence is not necessary, because already fulfilled. But generally the pin numbers of a symbol are dictated by the associated footprint, their sequence may differ from the model, and thus The Alternate node sequence is required.
kuser, could you post your solution here, so not to lead this thread into nowhere?
First I should mention that I created my own NAND-Schmitt-Trigger symbol and did not use the symbol for the entire CD4096 IC with 4 NANDs. I then have placed this symbol in my own spice component library. In this symbol, I used numbers (1,2,3,…) as pin designators instead of the alphanumeric labels “Y”, “A”, etc. I originally had. For convenience, I used the order of the parameters in .SUBCKT so that no re-ordering was required, hence “Y” is pin 1, “A” pin 2, “B” pin 3 etc.
My misunderstanding basically was that I thought I could use any label, as long as these would match in the .SUBCKT and in the symbol’s pin.
Q: I am not sure, is there a way to flag this question as solved? I did not find a button for this.