Suggestions for building,

testing and debugging digital circuits

 

Most important suggestion:

Build only a small part of your circuit, then test it and debug it. When this is working completely, then build some more and test and debug it. Repeat until the whole circuit is built, tested, and debugged.  This is called the "divide and conquer" approach.

Second most important suggestion:

Use a complete circuit schematic, as defined below, and like the example posted on the instructor's door, for building, testing and debugging.  This schematic should be done at the time you write up the Preliminary, and in fact is a required part of the documentation of your design. (Note: you will not receive full credit without a proper circuit schematic.) But even more importantly, you cannot adequately test and debug your circuit without a complete and correct schematic!

Building

-Use an accurate complete circuit schematic (including the gate symbols arranged as on the logic diagram (i.e. in logical flow from left to right), correct pin numbers on all gate inputs and outputs, integrated circuit part number on each gate, ground and power connections for each IC, etc) to build from, using it as a reference when making the circuit.  As each connection on the breadboard is wired, mark off either in color or with a check mark the corresponding connection on the circuit schematic.  In this way, when all the connections are marked (including power and ground for each IC) you know that your circuit has been completely built. Of course, since you will submit your original schematic to the TAs when you enter the lab, you must make a photocopy of it in advance, to have with you while you are building.

-Know the connection pattern of the chips you are using (this information is found on the pin layout diagrams of the ICs, whose Web links are given).  If you are not sure, check them again on the Web using the computer at your lab station.

-Know the connection pattern of the breadboard you are using, i.e. underneath the surface, which holes are connected to which other holes. If you are not sure, ask the lab technician or the TA.

-Due to prolonged and heavy use of the breadboards, the connections inside the breadboard have on occasion been found to be open-circuit, short-circuit and intermittent.  So don't trust them fully.  When in doubt, verify by testing in isolation. If an area of a breadboard is found to be faulty, then move the chip away from the bad area and relocate it, and its connection wires, in another nearby place on the breadboard.  You should NOT replace the entire breadboard, as this would require building the circuit all over again from the beginning.

-When placing ICs into a breadboard, orient them all the same way (for example, place them so that the lower numbered pins (e.g. pins 1-7) all face the same side of the breadboard).

-Sometimes the leg of an IC bends under the plastic package, instead of going into the breadboard when inserted.  It looks like it is connected to the breadboard, but in fact it isn't.

-Don't push wires into the breadboard so far that the insulation enters the hole, which could prevent the electrical connection you are trying to make.

-Strip only 0.5 cm. of insulation from wire ends, since long exposed metal wires can touch each other causing short circuits.

-When making connections with wires to, from or between the IC pins, try to keep your wires out of the way, to the side of the IC (not over it) and close to the breadboard.  In this way, the space over the IC remains open and clear, easily allowing testing and/or chip removal and replacement.  In other words, build a 2-dimensional, not 3-dimensional, circuit--with the wires in the same plane as the breadboard--FLAT.

Testing

-Build a little, test a little; build a little more, test a little more. Repeat till done :-)

-When testing, use a lead from an indicator LED and clip a wire onto the other end. Let this wire be your test probe, and touch it directly to the pin ("bacak") on the IC to get a reading of the output level.  In this way, you are sensing the actual level that the chip itself sees (which might not be the case if you take your measurement from a hole in the breadboard, or from a connecting wire). With a good clear circuit schematic as a guide, you will be able to navigate anywhere in the circuit quickly and accurately, to obtain any signal that you need to "see".

-When you test, you look at the actual value on the LED (indicating high or low), and compare it to the expected value

Debugging

-In debugging, there are two general approaches.  In the "inputs first" approach, you move from left to right on the schematic as you measure, and debug, looking at  input signals being combined into higher level functions via the layers of gates.  The last signal to be tested and debugged is the overall output, after previously testing and debugging its inputs.  This is the approach that should be used as you build your circuit bit by bit, moving from left to right, and testing each part as you build it. The other approach is "outputs first", where the focus of analysis moves from right to left (starting with the output side and moving towards the inputs). Here, signals are decomposed, and if a bad output is found, the inputs are analyzed to find out which one (if either) is the cause.

-If the inputs to a gate are correct (as measured on the pins of the package), but that chip does not produce the correct output, some possible causes may be: a) power and ground are not correctly connected (test them directly on the chip, using a test probe) b) output is being held high or low by some other signal (to check this, isolate the output pin and measure its level when connected to nothing else)  c) that area of the breadboard is causing unseen circuit effects on the chip's inputs, outputs or both (to check this, bend the output pin so that it perpendicular to the other pins and does not enter the breadboard, and repeat the test.  If a defective area on the breadboard is discovered, move the part to another area on the breadboard and mark the area of the defective row(s) and tell the lab technician)  d) the gate is defective, either from manufacture or from subsequent damage (if this is the case, please tell the lab technician and DON'T put the IC back in the box with the good ones!)