This page is the unfinished remains of a first attempt at the question of "how do we work with multi-gated devices".
I would read the later attempt, first, if I were you. If that leaves you wanting more, there is a link back to this page at the bottom of that!
While this page is now deprecated, I have been through it, editing out the errors which were there before the 12th of November due to confusion on my part of the roles of pin names and pin numbers when an invisible pin is involved.
If you've been here before, you need to know that on November 6th, 2011, this page was heavily re-written. Large chunks of stuff about "power ports", previously here, were "chopped out". I made a new page, all about power ports. To understand the page you are reading now, you first have to understand power ports. If you don't already know about power ports, read that page, and then come back and read about using gates in multi-gate chips!
Alternatively, there's also a shorter page just saying what a power ports are, without much help on how to use them.
I know.. you came here for the answer to your question. At least that's what drives me to pages on the web.
But I'm going to ask you to bear with me, just skim through this "on trust" that various useful bits and pieces emerge along the way.
You won't be ready for this unless you have some basic familiarity with KiCad already.
This page will give you some "tricks" for doing stuff. Also, I hope it will help you to understand devices with multiple gates in one package, e.g. the 7400 quad NAND. The tutorial used to try also to explain how ground and power rails are handled in KiCad. That was a mistake! That is a separate issue, with it's own tutorial, as I said a moment ago.
The [[co1schem | circuit]]] it is based on does almost nothing! Don't be puzzled by that. It suffices to illustrate certain KiCad issues. Whether the circuit would work isn't the point. There may even be flaws such as maybe a pull down resistor would be more suitable on the input. Just ignore that kind of issue, if you can. (And write and complain, if you can't!)
(The page name, by the way, comes from: SKills- using a QuadNand package. All of the "SKxxx" pages try to discuss skills, vs the "COxxx" pages, which aim to define concepts.)
Schematic… The resolution in "real life" is better, and you can pan and zoom… but I hope it is adequate to show you where we are going. See also the next two images… they show the first one, split in two to better fit the page.
And here it is in two halves….
Sorry.. here we come to a little "rough edge" which I will try to "sand down" in later editions of this page.
The circuit diagram shown in the three images above is 99% right. It may differ slightly from what the tutorial's text produces in one small (but important) way. You will see junctions on or near the "VCC", "VDD" and ground "things" (The ground "things" are little triangles.) What are these "things"? (All of them… VCC, VDD and ground…. are "power ports") They… and the rules about connecting them are in the other tutorial. (The junctions are superfluous in some cases… but they never do any harm, if you want to be sure you connected the power port you thought you connected!) For now, here at the diagram, I wanted to warn you about the junctions associated with them.
A "junction" is something you see on a schematic. It is a little "blob". If two lines cross, and there is no junction, they are not connected. If you see a "T junction", often if there is no "blob" then there is no connection.
And don't worry if you see slight differences, only as far as the junctions for power ports are concerned, between what you have on your screen, and what you see above.
PCB… colors tweaked…
On your computer, start the schematic by placing a 7400 gate on it. (You should only need to get the pointer, press A, enter "7400" in the name box, click "OK".)
Here's the first puzzle of using devices with multiple gates: While you and I know that a 7400 is a 14 pin chip with four NAND gates in it, according to KiCad, a 7400 component is just one NAND gate. And, there is "no way" to connect the power and ground rails to it!
The power and ground connections are "invisible pins" of the component. They get their connections… which don't show on the schematic… via KiCad "power ports", which I have attempted to explain in a "power ports" tutorial, which you should probably read before you read the rest of the tutorial on the page you are reading now, unless you know how to use power ports already.
I have done a FAQ answer to help you with learning the names of invisible pins.
If you look at the 7400 with the component editor….
… you will see "GND" and "Vcc", identified as being on pins 7 and 14 You don't see those on the schematic. They are "invisible pins". (All of this IS in the excellent PDF which comes with eeSchama, in fact. But can be hard for a novice to know where to find things, isn't it?) (You open the PDF by clicking eeSchema's menu item "Help | Contents". There are separate PDFs for each of the modules of KiCad, and another for the KiCad central project manager.)
So KiCad's 74xx.lib library does know about the ground and power connections for the 7400 after all.
How do we connect to them? That's covered in the "power ports" tutorial I mentioned a moment ago.
Going back to how you work with multi-gate chips…
Add an LED and a resistor to the output of the NAND.
Add the resistor and switch to one of the inputs. (No, I don't care if pull-down would have been better. Don't worry about that,… and don't rely on my choice, if you are new to TTL circuit design! It will work, I think, the way I've done it… but if not, the idea shouldn't be too far wide of the mark. The "floating" input would be dealt with later, in a "real" design.)
Add a "CONN_2" connector to the design. It will be for connecting Vcc to the board from your power supply. Wire up the things shown….
So far, so simple… I hope? (As far as drawing our circuit is concerned.) If not, you might want to skim my introductory tutorial, just so we are using the same terms, if nothing else.)
Add three power ports: one for "Vcc", two for "GND". Connect them to the existing circuit as shown in the image a little way down the page.
(The junctions shown in some of the schematics may not be necessary. Drag a power point to see if it is connected to the line it needs to be connected to.)
Here's a reminder of some "power port" information, It may be in the wrong place… I'll try to move it later, but for now….
If another component in the design, e.g. the 7400 we've used, has hidden pins with the same name as the power ports we placed, then, while no connections are shown on the schematic… (except "in our heads", if we are accustomed to "just knowing" that everything "connected" to GND is interconnected, whether there are lines or not)… they are connected as far as our design is concerned.
Save the netlist.
Run CVpcb…. use the following footprints. (Others would "do" in many cases, but let's stay on the same page.)
PINHEAD1-2 for CONN_2
DIP-14_300 for the 7400
SW_PUSH for the SPST
LED-5mm for LEDs
R4 for resistors
Note that there is no footprint for the Vcc and GND components. This is another hint as to their "specialness".
*Clear out any "old" board on the page.
*Read the netlist… be sure to read the right netlist… I find that the first time I read the netlist, PCBnew sometimes defaults to the netlist from earlier work.
*The rat's nest does not always show the most obvious way for two pins to connect. However, as soon as you start drawing a track, then all of the pins it needs to reach will be highlighted.
*If you zoom in, you see details… like the "Vcc" on pin 14 of the 7400's socket. Note: That information comes from the component you associated with the DIP-14 footprint when you ran CVpcb.
*If you drag CONN_2's footprint close to the DIL socket, you should see a rat's nest line "pop up", showing that they should be connected before the design is finished.
*The overall task is completed more more easily if you get components placed, and rotated right before you start laying down tracks.
Clever! Clever that the system "knows" that one of the pins on CONN_2 goes to Vcc. Clever that it knows that pin 14 of the DIL needs to go to that pin, and other parts of the circuit.
First "something further"…
(This should probably moved to the power ports tutorial. Sorry… it here, too(?), for now.)
I added the CMOS 4001 to the circuit to show you something else.
It calls its invisible power input pin "Vdd", as opposed to the "Vcc" used by the 7400. That's just a different choice of terms… Vcc, Vdd… whatever you call it, is it still where the positive terminal of the power supply gets connected. (While we're on the subject: When you find Vdd, say on a chip's datasheet, "Vss" is often used where "ground" is more widely used.)
No problem. We just connect a Vcc and a Vdd power port to the relevant wire in the circuit diagram. Whew.
Second "something further"…
One footprint… multiple components….
The 7400 is a single chip, and "sits" nicely in a DIP-14_300 footprint.
Not only are the power and ground pins an issue for the novice KiCad designer… (but not you, on that point, any more, I hope?…) but there's also the "difficulty" of the fact that there are four NAND gates in the device… and the component we use over in eeSchema draws one at a time. There is no "four NAND gate" component… and, while you "could", you don't want to make one.
If you want to use more than one of the NANDs in the chip, or if you just want to use a different one (so that your switches and LED would connect to different pins), here's what you do….
When the second "7400" component is added to the schematic, there is one little "secret" you have to know.
After it is on the "page", access its properties, and set the "unit" to something other than "1".
(I am planning to re-do this page, or at least redo the ending!! and show you more clearly all about using more than one of the gates in a multi-chip device.)