Sunteți pe pagina 1din 11

Lab #1 Truth Tables, ICs, and Breadboards

Revised 1_25_10

The three primary logic relationships, AND, OR, and NOT (or inversion) can be used to express any logical relationship between any number of variables. These simple logic functions form the basis for all digital electronic devices from a simple microwave oven controller to a desktop PC. We can write logic equations of the form "F = A AND B" that use these three relationships to specify the behavior of any given digital system. Pause a moment and think about this: any digital system, up to and including a highly complex computer system, can be built entirely of devices that do no more than implement these three simple functions. As engineers, we must address two primary concerns: how to express a given requirement or problem statement in terms of these simple logic relationships; and how to build electronic devices (or circuits) that can be used to implement these relationships in real devices. This lab will begin to explore the second of these questions how to arrange switching devices so that these relationships are realized. After completing this module, you should Be familiar with truth tables, understanding the row ordering used in ECE3714. now the truth-table definitions of AND, OR, NOT, NAND, NOR, XOR, and XNOR (or EQV) logic relationships; Understand how switching circuits can be used to implement basic logic functions;

Be able to sketch a logic circuit from a logic equation, and be able to read a logic equation from a circuit. Be able to create a logic circuit from a truth table definition; Be able to construct a basic logic circuit on the breadboard, including the appropriate connection of power, ground, and signal pins.

This module requires: A solderless breadboard The Digital chip kit

Contains material Digilent, Inc.

11 pages

Lab #1 Truth Tables, ICs, and Breadboards


Truth Tables Logic equations are used to show how an output logic signal should be driven in response to changes on one or more input signals. The equal sign (=) is typically used as an assignment operator to indicate how information should flow through a logic circuit. For example, the simple logic equation F = A specifies that the output signal F should be assigned whatever voltage is currently on signal A. Note this does not imply that F and A are the same circuit node in fact, the use of a logic equation to specify circuit behavior implies that the inputs and outputs (in the case, F and A) are separated by a circuit component. In digital circuits, circuit components act like one-way gates. Thus, the logic equation F = A dictates that a change on the signal A will result in a change on the signal F, but a change on F will not result in a change on A. Most useful logic equations specify an output signal that is some function of input signals. For example, the logic equation F = A and B specifies a logic circuit whose output will be driven to a high voltage only when both inputs are driven to a high voltage. Below are six common logical functions written as conventional logic equations. The AND relationship, F = AB, can be written without an operator between the A and B (but more properly, a dot () should be placed between the variables to make the relationship clear). The OR relationship uses the plus sign, and the NOT or inversion relationship is shown by placing a bar over the inverted variable or by placing a single quote character after the variable or quantity to be inverted (two possible notations are shown for several relationships).
AND OR XOR NOT NAND NOR

F=AB + AB

Compound logic expressions can be built from these basic functions. For example, an output might be driven to a high voltage if input signals A and B are both at a high voltage, or if input C is a low voltage, or if C is a high voltage at the same time that A is a low voltage. This relationship can be concisely written as F = (AB + C) + AC . A truth table is the primary tool for capturing logical relationships in a concise and universally understood format. All possible combinations of inputs are shown in rows on the left of a truth table. A truth table with N inputs requires 2N rows to list all possible input combinations. A 0 or 1 in the rightmost column indicates whether the logical relationship evaluates to a true for the combination of inputs shown in the adjacent row. For example, a truth table with two inputs, A and B, will require 22, or 4 rows to list all possible combinations: 0 0, 0 1, 1 0, and 1 1. For the ANDing operation, the output is true only when both inputs are true, so the rightmost column would have a 1 only in the last row. For F = A and B, the truth table would have a 1 only in the second row. Problem 1: Complete the truth tables in the lab exercise pages for the basic logic functions shown on the datasheet.

Contains material Digilent, Inc.

Lab #1 Truth Tables, ICs, and Breadboards


Integrated Circuits (or chips) and chip packaging The terms chip and integrated circuit refer to circuits using microscopic transistors that are all co-located on the same small piece of silicon. Chips have been designed to do all sorts of functions, from very simple and basic logical switching functions to highly complex processing functions. Some chips contain just a handful of transistors, while others contain several million transistors. Some of the longest-surviving chips perform the most basic functions. These chips, denoted with the standard part numbers "74XXX", are simple small-scale integration (SSI) devices that house small collections of logic circuits. For example, a chip known as a 7400 contains four individual NAND gates, with each input and output available at an external pin. As shown in the figures below, the chips themselves are much smaller than their packages. During manufacturing, the small, fragile chips are glued (using epoxy) onto the bottom half of the package, bond-wires are attached to the chip and to the externally available pins, and then the top half of the chip package is permanently affixed. Smaller chips may only have a few pins, but larger chips can have more than 500 pins. Since the chips themselves are on the order of a centimeter on each side, very precise and delicate machines are required to mount them in their packages. Smaller chips are usually packaged in a "DIP" package (DIP is an acronym for Dual In-line Package) as shown below. Typically on the order of 1" x 1/4", DIP packages are most often made from black plastic, and they can have anywhere from 8 to 48 pins protruding in equal numbers from either side. DIPs are used exclusively in through-hole processes. Larger chips use many different packages -- one common package, the "PLCC" (for Plastic Leaded Chip Carrier) is shown below. Since these larger packages can have up to several hundred pins, it is often not practical to use the relatively large leads required by through-hole packages. Thus, large chips usually use surface mount packages, where the external pins can be smaller and more densely packed.

Shown on the right is a representation of a 7400 logic IC that contains 16 transistors organized as four 2-input NAND gates. This small chip is housed in a 14-pin DIP package that provides pins for each of the NAND gates inputs and outputs, as well as a power and ground pin (labeled Vdd and GND). Note the picture shows the four logic gates placed inside a DIP outline, thereby showing both the function and pinout (or pin definition) of the IC. On schematics and on circuit boards, chips are most often shown as square boxes denoted with a "U__" reference designator. Contains material Digilent, Inc. 3

Lab #1 Truth Tables, ICs, and Breadboards


When placing chips in a circuit, pin 1 must be correctly oriented so that all connections can be properly made. The circuit board silkscreen, IC sockets, and ICs all indicate the location of pin 1. For smaller chips and their sockets, a small notch is located on one end indicating pin 1 is to the immediate left. By convention, that same notch pattern appears in the circuit board silk screen. For larger IC's, either the corner of the IC nearest (and to the left) of pin 1 is shaved off, or a small indentation (or dot) is located at the corner nearest pin 1.

The Solderless Breadboard A breadboard is used for holding logic chips and wires that connect them together in order to realize a desired circuit. There are two types of common connections on the breadboard: 5-pin connections (busses)which run vertically (as shown in the figure to the left ) on the board. There are hundreds of 5-pin connections shown here.

50-pin connections (busses) which run horizontally (as shown in the figure to the left) on the board. They are placed in groups of five. There are two 50-pin busses shown here.

What is meant by common connections is that a row or column of common pins will have the same voltage as each other (or same logic state). This common connection will allow multiple connections to be made at the same pin on a logic chip. When placing a logic chip on the board, place it over the gap between the two sets of 5-pin connection (if it is done properly, it will fit right). To make a connection between two pins on the breadboard, take a wire and insert it in one of the common pinholes to the other desired pin. The figure below shows a 14-pin integrated circuit plugged into the breadboard (note how the integrated circuit straddles the white area between the 5 pin busses). Figure B1.b shows an offboard wire plugged into one of the 35-pin horizontal busses, then a short wire connecting the 35-pin bus to the 5-pin bus corresponding to pin #14. Figure B1.b also shows a short wire connecting pins 3 and 5 of the integrated circuit.

Contains material Digilent, Inc.

Lab #1 Truth Tables, ICs, and Breadboards


The figures below show a 14-pin integrated circuit plugged into the breadboard (note how the integrated circuit straddles the white area between the 5 pin busses). Figure B1.b shows an offboard wire plugged into one of the 35-pin horizontal busses, then a short wire connecting the 35-pin bus to the 5-pin bus corresponding to pin #14. Figure B1.b also shows a short wire connecting pins 3 and 5 of the integrated circuit. Fig B.1b: Wire Connections, off board wire connected to pin #14, Pin #3 connected to Pin #5.

Arrows show connectivity off board wire, probably power

wire

Pin #3 wire

Pin #5

Fig B.1c: 14 pin Integrated Circuit plugged into Breadboard Pin #14 Pin #8

Dot shows pin #1

Pin #1

Pin #7

Contains material Digilent, Inc.

Lab #1 Truth Tables, ICs, and Breadboards


Introduction to the MFJ board Several of the laboratories within the ECE department use the MFJ Analog/Digital Breadboard to provide power and signals for student labs. In ECE3714, the MFJ board will be used to provide +5 volts to the solderless breadboard along with switch inputs and LED outputs. To the left is a picture of the MFJ breadboard. Although this box is called a breadboard, this is not the solderless breadboard.

Place a solderless breadboard on the MFJ board and wire the +5 Volts on the MFJ board to the center bus labeled +. You will have to press the button on the +5 volt connector on the MFJ board in order to put the wire into the connector. Place a second wire between the COM (for common ground) on the MFJ board and the center bus on the solderless board labeled -.

To show how the busses on the solderless breadboard work, place one end of a long wire from the + bus on the breadboard and place the other end of the wire in the LED connector labeled LED 7. The LED should light up if the connection is working properly. This shows that the busses on the solderless breadboard run the whole length of the board. Some solderless breadboards have busses that only run halfway. The LEDs are wired so that if a positive voltage is applied to the connector, the LED should light. Disconnect the wire to the LED. Contains material Digilent, Inc. 6

Lab #1 Truth Tables, ICs, and Breadboards

Problem 2. Constructing a basic logic circuit In this lab, you will implement six circuits using six basic logic chips. Each of the circuits requires two inputs, and the same two inputs can drive all circuits at the same time. These two inputs arise from SW1 and SW2 on the breadboard. The output of each circuit will be connected to an LED on the breadboard. The objective of this exercise is straightforward: construct six simple circuits to illustrate the functionality of each of the six chips. For each circuit, the inputs of a single logic gate from each of the six chips will be driven from SW7 and SW6 connections, and the outputs will drive individual LEDs. The six chips are: 74HC00 two-input NAND gate; 74HC02 two-input NOR gate; 74HCC04 inverter; 74HC08 two-input AND gate; 74HC32 two-input OR gate, 74HC86 two-input XOR gate

You will build the circuit shown on the right. Note in this circuit, the wires have been labeled with the input names rather than drawing all wires. This makes a schematic easier to read. All of the inputs labeled A will be connected together, as will the inputs labeled B. Each of the outputs will be connected to separate LEDs. LEDs 7 and 6 are used to show the status of the inputs A and B.

Contains material Digilent, Inc.

Lab #1 Truth Tables, ICs, and Breadboards

To construct the circuit for this lab, complete the following steps. 1. Locate the DIP chip labeled 7404. Note the labels on the chips are often faint and hard to read. When searching for the chips, ignore any letters before or after the part numbers. Also, you can ignore any letters in the middle of the numbers. See the diagram below to determine what type of device the 7404 chip provides. What type of device does this chip provide?

2. Press the chip into the breadboard so that it straddles the center groove, and use pre-stripped pieces of jumper wire to connect the +5 bus on the solderless breadboard and the pin on the chip labeled VDD. (This will be the supply voltage to the chip). Use a second wire and connect the bus on the solderless breadboard to the GND pin on the chip. Using short wires will make your board much easier to debug if there are problems. Try to use a wire as short as possible. Only one wire is needed for the signal input for the 7404 chip. Use a jumper wire to connect the SW7 signals on the switch on the MFJ board to the input pin. (use pin1 which is the first of six gates on the chip). Use more wires to connect the output of the gate (pin 2) in the 7404 chip to LED7 on the breadboard. You may need to use more than one wire to reach to the LED connector. Test out the circuit to see if it produce the expected results. If the LED is not on when the switch is at 0Vdc and the LED is off when the switch is at 5V dc, ask for help from your TA.

Before adding the rest of the circuits to the solderless breadboard, move the input signal from switch7 to the bus labeled + near the bottom of the solderless breadboard. This bus will be used to be an input signal (input A) for all of the remaining circuits. Add another wire to the input on the 7404 chip and Contains material Digilent, Inc. 8

Lab #1 Truth Tables, ICs, and Breadboards


confirm the circuit still works. Add a second input signal from switch 6 to the bus labeled near the bottom of the solderless breadboard (do not wire the input signals from the switches to the busses used for supply voltage and common ground). Press the rest of the chips into the breadboard so that they straddle the center groove, paying attention to where pin 1 is placed, and use pre-stripped pieces of jumper wire to connect the +5 supply voltage and COM busses on the solderless breadboard and the associated Vdd and Gnd pins on each of the chips. 4. Choose one of the gates in each chip, and connect one of the chosen gates inputs to the A signal bus row on the breadboard, and one input to the B signal bus row. Note that all chip inputs will be indirectly connected to the SW7 and SW6 inputs by using intermediate breadboard connections. 5. Use pre-stripped wires to connect the output of the logic gates used to LED5 LED2. Do NOT connect the other gates (input or output) to any wires. Applying power to the output of a gate can destroy the chip!!! 6. Slide SW7 and SW6 back and forth, noting the behavior of the output LEDs. Recall that a high voltage on an LED input will cause the LED to illuminate. 7. Complete the physical truth table to document the behavior of your circuits. After your circuit has been constructed, apply power to the Breadboard, and move SW1 and SW2 back and forth. Fill in the voltage truth table in the lab datasheet to record the output behavior of the logic gates. Entries in the table should be listed with the switch settings as either high (VCC) or low (GND). The output should be listed as either ON or OFF, depending on whether the assigned LED was on or off for a given set of inputs.

Contains material Digilent, Inc.

Lab #1 Truth Tables, ICs, and Breadboards

Contains material Digilent, Inc.

10

Lab #1 Truth Tables, ICs, and Breadboards


Problem 5. Asserted versus Negated In engineering, we are interested more in performing actions than in the "truth" of a given relationship. For example, lets say we have produced a circuit that can turn on an automobile's dashboard warning light whenever the coolant level is too low AND the engine is too hot. If the coolant level ever becomes too low and the engine temperature too high, the circuits output is said to be asserted to indicate the output signal is ready to do some work (like illuminating a warning light). We likewise apply the term to inputs the AND relationship in this example may be stated as "the output F is asserted when the inputs A and B are both asserted". Some input signals to logic circuits might normally be at a low voltage, changing to a high voltage only when some input device or circuit is activated (like the pushbuttons on the board). Other input signals might normally be at a high voltage, changing to a low voltage only when an input device is activated. In either case, we can use the term asserted to indicate the input is producing a signal at either a low voltage or a high voltage in response to some action. Using this definition, an asserted signal at a high voltage is said to be asserted high, and an asserted signal at a low voltage is said to be asserted low. An asserted high signal at a low voltage is said to be negated or not asserted, and an asserted low signal at a high voltage is said to be negated or not asserted. The same signal definitions are also applied to output signals from logic circuits. If a logic circuit produces a a high voltage when its inputs are asserted, its output is said to be asserted high, and if a circuit produces a low voltage at its output, the output is said to be asserted low. Based on the physical truth table completed for problem 1, complete the logical truth table in the datasheet. A logical truth table assigns 1s and 0s to voltages. Some texts and other references allow a 1 to be assigned either to a low voltage or to a high voltage, depending on the assertion level of a signal. In this case, we will assign a 1 to a high voltage, and a 0 to a low voltage. Replace the ON and OFF values in the table for Problem 4 with the appropriate 0 or 1 values in the table given for problem 5 on the exercise sheet.

Contains material Digilent, Inc.

11

S-ar putea să vă placă și