Home
Homework
Labs
Lab Resources
Class Resources

Lab 1

Exponential Calculator

 

Introduction

In a prerequisite course (ECE130), you became adept at designing combinational circuits, and used LogicWorks to simulate and verify that your design was correct. You have also had some experience building and testing real circuits in ECE200. The purpose of this lab is to put those skills together to design, build, and test a digital logic circuit of moderate complexity.

Objectives

bulletRefresh your gate-level design skills from ECE130
bulletDesign, implement, and test a combinational logic circuit of significant size

Parts List

bullet74HC10 triple 3-input NAND gate packages (74LS10 is also acceptable, but use all of one type or the other). Click the part number to see the data sheet.
bullet74HC4040 12-stage binary counter

Equipment

bulletAgilent 54622D mixed-signal oscilloscope (MSO)
bulletDigital probes for MSO
bulletAgilent 33120A function/arbitrary waveform generator
bulletFixed 5-volt power supply
bulletBreadboard

Background on Fixed-Point Representation

Digital circuits that perform mathematical functions use either fixed-point representation of floating-point representation. The latter technique permits the largest dynamic range of values for a given number of bits, but the processing circuits are far more complex that their equivalent fixed-point processing circuits.

In a fixed-point representation, the radix point (or "decimal point", which is really a reference to base-10 numbers) is placed at the far left side of the bits.

For example, the binary pattern "100101" is understood to mean "0.1001012", where the subscript "2" indicates a base-2 number. The decimal equivalent of this binary number is 2-1 + 2-4 + 2-6 = 0.510 + 0.062510 + 0.01562510 = 0.57812510. Alternatively, you can slide the radix point six places to the right (this is equivalent to multiplying by 26), convert to a decimal integer, and slide the radix point back to the left side (divide by 26). Thus, 1001012 is 3710, and 37 divided by 26 = 64 is 0.578125.

Note that all values in the fixed-point representation are contained in the range zero to almost one (the maximum value is always (2N - 1) / 2N, where N is the number of bits used to represent the fixed-point numbers).

Design Specifications for Exponential Calculator

The circuit you will design in this lab will accept a four-bit fixed-point value "x" as input and produce a four-bit fixed-point value "y" that is calculated as "y = e-ax," where "a" is a constant of value 5. Since "y" has more precision than what will fit in four bits, use rounding to convert to the closest four-bit representation.

First, you should develop the truth table for this circuit. Once you have done so, you may wish to email your truth table to your instructor so that it can be verified before designing your circuit. Please allow the instructor 24 hours to respond.

The entire system must be implemented using 3-input NAND gates only, even to perform any necessary logic inversions.

Prelab

  1. Review the data sheet for the 74HC4040 12-stage binary counter. Design a circuit based on this device that will generate an ascending binary sequence 0000, 0001, 0010, 0011, ..., 1110, 1111 that can serve as the input stimulus to your combinational circuit.
  2. Use K-maps to create a minimized two-level circuit for each of the four output signals. If you can't remember what "minimized two-level" circuit means, look it up in your ECE130 textbook or in your ECE333 textbook.
  3. Draw the finished schematic. Include all pin numbers and component names for all NAND gates. Use the format "Um:n", where "m" indicates the package number, and "n" indicates the gate number with the package. For example, the second gate within the fifth package would be identified by placing the text "U5:B" inside the body of the gate symbol.

    NOTE: You will need to present this schematic in lab before you will receive any debugging help from the instructor!
     
  4. Simulate and verify your design using LogicWorks or the equivalent. Explain how you know your circuit is working according to specifications.

    NOTE: This step is critical! Do not proceed with any hardware construction until your design is 100% correct!

    TIP 1: You can speed up your design entry by using text labels for your signal names rather than routing wires all over the page. Select your "text" tool, single click on a device output, and enter the signal name. To connect an input of another device to this output, you simply need to single click the device input and use the same name.

    TIP 2: You are strongly encouraged to build your circuit before you get to lab, but only begin construction after you are confident in your simulation.
     
  5. Bonus points in lab will be awarded in the following categories:
    - lowest number of 74HC10 packages
    - lowest number of NAND gates (in full design)
    - best board layout (packages and wiring)
     
  6. A photocopy of your prelab pages is due at the beginning of class the day before lab.

Lab

NOTE: Since you may be learning to use the Agilent 54622D mixed-signal oscilloscope (MSO) for the first time today, you will find it helpful to restore the MSO's factory default settings before you begin. Press "File -> Save/Recall", then "Softkey -> Default Setup". The first word refers to the panel grouping, and "Softkey" refers to the six buttons directly underneath the main screen.

  1. Set up the 74HC4040 counter circuit to generate a four-bit input stimulus source. Use the Agilent 33120A function/arbitrary waveform generator to generate the squarewave clock signal needed by your counter circuit. Use the MSO to ensure that the squarewave switches between zero volts and five volts before you apply it to your circuit (hint: look for the "offset" setting on the function generator).
  2. Build your circuit. Tips:
    - Do not route wires over the packages in case a package needs to be replaced
    - Unused inputs must be tied to a specific voltage level
    - Staples, specifically the standard half-inch variety, offer a quick way to make power/ground connections (avoid using the staples that are lightly coated with plastic, though)
    - Take your time when building the circuit, and double-check your work.
  3. Monitor your circuit's inputs and outputs with the digital probes of the Agilent 54622D mixed-signal oscilloscope (MSO). Set up the MSO to display the input and output as hexadecimal or binary values (this is easier to read than eight signal traces):
    - Press "Digital -> D7 Thru D0" to activate digital display
    - Use "Digital -> Channel Select" to highlight Channel D1
    - Use the "Digital -> up/down" knob to move the trace down until it overlaps Channel D0
    - Repeat this process for channels D2 and D3
    - Press "Measure -> Cursors" to activate a cursor, and note how the hexadecimal value of the combined trace displays at the bottom of the screen
    - Press "Softkey -> Mode" to select binary or hexadecimal display
    - Group channels D7 through D4 together using the same techniques described above
    - Associate digital probe D7 with the most-significant bit (MSB; left-most bit) of your input
    - Associate digital probe D3 with the MSB of your output
  4. Verify that your hardware meets specification for each of the sixteen possible inputs.
  5. Demonstrate your finished circuit to the instructor.

All done!

bulletClean up your work area
bulletRemember to submit your lab notebook for grading at the beginning of next week's lab