CIS 351

Introduction to Digital Logic

Fall 2020

Important! You have two choices for lab this week. Please read carefully.

  1. Come into campus and build circuits using physical chips (the kind you can buy at Radio Shack), or
  2. Work remotely (through BB Collaborate, as usual) on Project 1.

The circuits lab (given below) is one of student's favorite labs; but, under current social distancing guidelines, I can only support 11 students per section. If you choose to complete this lab, please sign up on the Blackboard Wiki. If there is sufficient demand, I will figure out how to offer it again soon.

The main constraints for this lab are

  1. I only have 11 kits (previously, I could require students work in teams of two), and
  2. under current social distancing guidelines, The EOS and Arch labs only hold 12 students total.

You are welcome to team up if you can do so and maintain an appropriate social distance. For example, if someone wants to join in remotely (e.g., over Zoom) the remote person won't count against the limit. You are also welcome to take your kit to another room in MAK (it can't leave the building). Then you wouldn't count against the capacity limit in EOS/Arch.

Author: Prof. Greg Wolffe.


Warm up

Questions 1 through 4 are not due for credit.

Overview

The purpose of this lab is to provide a simple introduction to basic electronics, and to investigate the principles of Boolean algebra. Please pay special attention to terminology, safety issues, and standard lab practices.

Activities

Resources

Equipment

Familiarize yourself with the following components of your lab equipment toolbox:

Some important guidelines when working with CMOS:

To use integrated circuits with a breadboard:

Creating a Simple Circuit

Before creating your first circuit, there is something you need to understand about LEDs: Normal, incandescent light bulbs produce light by resisting the flow of electricity. This resistance produces heat, which causes the filament to glow. When you drain a flashlight battery, most of the energy in the battery has been converted to heat.

In contrast, LEDs produce light by exciting electrons causing them to release photons ("light particles"). This process uses use very little energy. Consequently, LEDs do not resist the flow of electricity. When there is nothing to resist the flow of electricity, the amount of current (think "number of electrons per second") increases. You may remember the following formula:

V = IR

Or, in other words, voltage equals current (in amps) times resistance (in Ohms).

  1. Normal List
  1. Suppose you hooked up a red LED with a resistance of 1 micro Ohm (1x10-6 Ohms) directly to a 5 volt battery. Using the formula above, how much current will be drawn from the battery?

The power supply cannot produce that many amps. However, the 1 amp that the power supply can deliver is enough to damage the LED and (more importantly) the breadboard. Therefore, always add a resistor as shown in Figure 1.1 to limit the amount of current through the diode to about 10mA.

  1. LEDs typically use a fixed amount of energy, referred to as the "voltage drop". A red LED has a voltage drop of 1.7V, leaving 3.3 volts to "push" the current through the resistor. How strong of a resistor should you add to the circuit to limit the current to 10mA?
  2. What value resistor should you use for a green LED with a voltage-drop of 2.1 volts?
  3. What are the color codes for the resistors in the preceding questions?

Now that you understand the importance of using resistors, construct the circuit shown in Figure 1-1 and described below. Simple LED

Using Integrated Circuits

Integrated circuits typically contain multiple logic gates and hence provide multiple input and output connections (called pin outs). Find an IC labeled 74HCT08 - this is a quad 2-input AND gate. That means there are four AND gates within the chip, each of which takes two inputs. Each AND gate implements the Boolean AND function.

If the chip is positioned with the notch to your left, then pin number 1 in the lower-left corner. The remaining pins are numbered sequentially and counterclockwise.

Integrated circuits need power in order to open and close the transistors that implement the gates they contain. Pin 14 (in the upper-left corner) is called VCC. This is where you connect the source voltage. Pin 7 (in the lower-right corner) is where ground voltage is applied. In other words, Pin 14 must be connected through a breadboard terminal and power distribution strip to the positive terminal of the battery. Likewise pin 7 must be connected to the negative terminal of the battery. Never place a load (current and voltage) onto a pin unless the chip is also powered through pins 7 and 14.

The figure below shows the pinout for chip 74HCT08 --- a chip containing four 2-input AND gates. Pins 1 and 2 are the input to the first of the four AND gates, pin 3 is the output. Likewise, pins 4 and 5 are inputs to an AND gate with output pin 6, pins 9 and 10 (input) connect with pin 8 (output), and pins 12 and 13 (input) go with pin 11 (output).

AND pinout

Your kits also include the following integrated circuits:

Designation Operation
74HCT00 NAND
74HCT02 NOR
74HCT08 AND
74HCT32 OR
74HCT86 XOR

They are all quad 2-input ICs - meaning there are four gates within each chip, where each gate takes two input. This page shows the pinouts for these chips.

To investigate the operation of an integrated circuit that implements the AND function, construct the following circuit (Figure 1-3 gives the schematic):

AND gate and LED Perform the following:
  1. Construct a truth table from your observations.
  2. Take the wires attached to pins 1 and 2 and leave the other ends floating in the air. Describe the effect of having these "floating inputs". (To get some more interesting behavior, grab the floating ends with your fingers and wiggle them.)

Switches

You may find it convenient to use switches to control whether an input wire has a "1" or a "0" on it; however, as you noticed, floating inputs can cause erratic behavior. In the Resources section of the course web page, the page Using Switches explains how to correctly use the two types of switches in your kit.
  1. Add switches to the circuit you built (the one shown in Figure 1-3). You may use either dip switches or momentary switches. Demonstrate to the instructor or lab assistant that your circuit works correctly.

Experiment

  1. Get a random IC from me. Replace your 74HCT08 with the new chip. Construct a truth table from your observations. Identify the type of gates the chip contains. (Your writeup needs to include the letter on the chip.)

Creating a more complex combinatorial circuit

Digital logic is implemented by using basic logic gates as building blocks to create more complex circuits. A combinatorial circuit is a set of gates whose output function depends only on the values of its current inputs (i.e., there is no storage or feedback involved in the system). The following circuit is a common combinatorial circuit.

You will need 2 quad NAND IC's (74HCT00), 2 resistors, and 2 LEDs to construct it. I suggest using DIP switches in the "pull-down" configuration to control the values of A and B. Remember to use 4.7K ohm resistors for your switches.

  1. Determine the truth table from observation. Place the column for Y to the left of the column for X. In other words, treat YX as a two-bit number.
  2. Using your observations as a guide, describe what simple operation this circuit implements. (Hint: Place the LED for output y to the left of the LED for output x.)
  3. Demonstrate your circuit to the instructor (or lab assistant).
Mystery circuit

Updated Tuesday, 13 October 2020, 1:15 PM

W3c Validation