The data bus

When you work with digital circuits, as we are in this project, it is often the case that two parts of the circuit transmit and receive a digital word, like a byte. The wires that transmit each bit of the word is a bus, and it can be thought of a a single bundle of wires. The keyword here is “single”. Instead of drawing the bus as seven seperate wires, we can draw it as a single wire. To show to the reader, and to Kicad, that this is a bus, not a simple wire, we can draw it thicker than a normal wire.

In this chapter, I will show you how to use a bus to connect the seven segment display to the shift register’s data pins.

Let’s start by wiring the seven segment display to the resistors, the “normal” way: by creating individual wires.

Image

Nothing fancy here. The inputs of the seven segment display are connected to the resistors via wires.

Now, we will use a single bus to connect the shift register IC data pins to the other side of the current limiting resistors. To do this, start by clicking on the bus component button on the vertical tool bar.

Image

The bus component.

The bus component button looks like a straight blue line, as opposed to the normal wire that is a thin green line. Click on the bus button to enable it, and then draw the bus starting from above the right-most resistor to the bottom right corner of the IC, like in this image:

Image

The blue thick like is a bus. Nothing goes in or comes out of it at the moment. We will add entries and exits next.

Next, let’s add the entries and exits to the bus. We’ll use the Bus Entries component for this task.

Image

Use the Bus Entry component to add entries and exists to the bus.

Click on the Bus Entry component to select it, then carefully start adding entry wires on the bus. This will take a few moments to get right when you attempt it for the first time. You need to work out the right spacing between the point where you click to add an entry and the bus. The bus entry wires are angled, and this makes it tricky to judge the correct distance at first.At the end of the process, you should have something like this:

Image

The bus entries, added to the bus adjacent to the IC, and the exits over the resistors.

Once you have bus entries and exist added to the bus, you need to use normal wires to finish the connections between the bus entries and exists and the pins. Click on the wire button, and finish the connections. In the end, you should have something like this:

Image

The bus entries/exists connected to the pins.

You may be wondering now, how does KiCad know that, for example, the QA or pin-15 of the IC is supposed to be connected to pin 5 on the seven segment display? The answer is that Kicad doesn’t know unless you label both pins with the same name. To do this, we will add labels to all pins that are meant to be connected via the bus, like we did in the previous chapter.

Go ahead and start adding labels. Start with the IC and pin 15, and label that as “sg0”, then pin 1 is “sg1” and so on. On the side of the resistors, label the right-most resistor as “sg0” (same name as pin 15 of the IC), then next resistor to the left will be “sg1”, and so on. In the end, your schematic will look something like this:

Image

We have added labels to all pins that are connected to the bus.

At this point, our schematic contains all data pins of the IC connected to the seven segment display, via a bus. The power wiring is also done, and so it the wiring between the connector and the IC. Notice that pin 9 on the IC is still not connected? In fact, we don’t want to connect it to anything. But, if we leave it like this, Kicad’s ERC will complain about it. I will show you how to deal with this issue in the next chapter.

Back to top
« « Hidden pins and the power flag | The unconnected component » »