A user asked for help on a circuit .. this is the result .. this is a good example of how to use subcircuits, and the power of Spicy.
OK, here is how you do it:
The basic idea is, we make a circuit, we get the netlist, and we make a subcircuit out of that ...
Start with the logic diagram: http://prntscr.com/2sbj2g
Make this circuit in Spicy:
Notice you need XOR, which is not a standard part, but there is an XOR model on the Spicy models page: http://ischematics.com/validModels.py
, We can use this model for XOR ... in the new version of Spicy you can make custom symbols and so there will be a lot more parts very quickly, but in this older version if there is not a standard symbol for a part, you have to use a subcircuit box ... it works the same ... you place a subcircuit symbol, and you set the value to the name of the model .. in this case the XOR parts are set to this model: http://ischematics.com/validModels.py?MODEL=LOGIC_XOR
I first make the basic portion of the circuit, two inverters and an XOR: http://prntscr.com/2sbk2v
I wired them up also
Now, select and copy that 5 times .. you need 6 of those ... note that when you copy, you have to click the select button, drag a box around what you want to select, then click copy, then you drag the new copy into position: http://prntscr.com/2sbkpk
Now duplicate the XOR subcircuits by clicking on them, and then clicking duplicate: http://prntscr.com/2sbkv9
, you need 3 of them at the next level
You should now have something like this: http://prntscr.com/2sbl76
only partial schematic shown ... use the scroll menu on top right to move around ..
Once you are done adding parts, add ports so that you can name the inputs and outputs, like this: http://prntscr.com/2sbmt6
Actually if you name ports with an underscore then number at the end, starting with _0, when you copy them they will be renamed nicely in order ...
OK, now, i created the circuit, and uploaded to the Spicy online circuit library (OCL) .. you can click the OCL tab, clecik Clear Fields, then enter "parity" and click search ... http://prntscr.com/2sbpi0
you will see a button to import the circuit .. do that and you will have the circuit i just made
Now, notice i added a voltage source .. .this is required by Spicy because it thinks you want to simulate it and it has to be 5V because it is a logic circuit .. but since we are only wanting to make a subcircuit, we will remove it from the netlist ....
The netlist is attached as generated by Spicy.
Now, to make a subcircuit, you need to create a subcircuit definition using spice syntax ... in the older version you had to do this manually, and in text by uploading the model on our website (go to Model Upload from the ischematics.com
I created this subcircuit called PARITY and uploaded, you can see it here: http://ischematics.com/validModels.py?MODEL=PARITY
To learn about subcircuits, see here: http://newton.ex.ac.uk/teaching/CDHW/Electronics2/userguide/sec2.html#2.4
Now, we are almost done .. to use the subcircuit, just make a new schematic and place a subcircuit part, define the inputs and outputs, and set the value to PARITY (the model name) ...
This shows me specifying the input names, and output names for the subcircuit: http://prntscr.com/2sbr61
, and Here is the value of the subcircuit: http://prntscr.com/2sbrcp
Once you do that .. this is what you get: http://prntscr.com/2sbrh4
That is the full integrated circuit in one part, ready to use!!
Let's test it .. .since it should give odd and even parity outputs depending on inputs, let's try one for each case ... if i ground all inputs, i should get even parity .. i will simulate transient for 1ms
Here is with all inputs grounded: plot: http://prntscr.com/2sbsy0
Here is with one input high: Schematic: http://prntscr.com/2sbt5c
, plot: http://prntscr.com/2sbt9f
So there you go! A custom subcircuit made from a datasheet, made into an IC part in Spicy, and simulated ..
Spicy is very powerful, but I can see how this example shows how clunky the old interface is .. we developed the new one over the past year to make all this much much easier .. it will be available very soon. Until then I hope this example helps you. You can see how poweful this can be, when building up larger circuits with subcircuits. The new version makes this much easier and quicker to do.