LAB 1

 Combinational Circuit-Exponential Calculator

 

Introduction

In  the prerequisite course (ECE130-Introduction to Logic design ), you designed combinational circuits  and you used specific CAD tools l 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  combinational logic circuit of moderate complexity.

Objectives

bullet Refresh your  logic gate-level design skills from ECE130. Please review:
bullet Design, implement, debug and test a combinational logic circuit of medium  size

Parts List

bullet CMOS 74HC10 triple 3-input NAND gate packages (74LS10-TTL is also acceptable, but use only one type). Click the part number to see the data sheet.
bullet CMOS 74HC4040 12-stage binary counter

Equipment

bullet Agilent MSO 7012B Mixed-Signal Oscilloscope (MSO)
bullet Digital probes for MSO
bullet Agilent 33120A function/arbitrary waveform generator
bullet Fixed 5-volt power supply
bullet Breadboard

Design Specifications for Exponential Calculator

bullet The circuit  that you will design in this lab will accept a four-bit fixed-point value "x" as input and produce a four-bit fixed-point output value "y" that is calculated as:

         y = e-ax, where "a" is a constant of value 5.

bullet

Since "y" has more precision than what will fit in  four bits, use rounding-up  to convert to the closest four-bit representation.

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

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).

Prelab

  1. Write the Truth Table for the exponential calculator (combinational circuit). The inputs are x3,x2,x1, x0 and the outputs are  y3,y2,y1, y0 (x3 and y3 being the MSB). (Hint: Show the calculations like decimal values for x, y).  Following this link, check your truth table.
  2. Use K-maps to create a minimized two-level circuit for each of the four  y3,y2,y1, y0 output signals. (Sum -Of-Product form). Because the entire  circuit must be implemented on the breadboards using 3-input NAND gates only (even to perform any necessary logic inversions) make the necessary transformations to get the functions in NAND-NAND forms. (HINT: You may end up with  more than two levels design using NAND gates with 3 inputs).
  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 within  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. (optional) Simulate and verify your design using PSpice or Cadence Nc Sim  or other  equivalent CAD tool that you learned previously. Show that  your circuit is working according to the specifications.

    (NOTE: This step is usually critical! Do not proceed with any hardware construction until your design is 100% correct!
     
    You are strongly encouraged to build your circuit before you get to lab, but only begin construction after you are confident that your design is correct.)
  5. 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 stimuli (x3,x2,x1, x0) to your combinational circuit  in the lab (Hint: Design a free running counter).
     A photocopy of your prelab pages is due  the day before lab.

 

Lab procedures

  1. Build your circuit.
    - 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.  If you are using only one or two inputs of a NAND gate, tie the other inputs to Vcc-the equivalent of logic  "1". If you are not using all the available gates in a package, tie the   inputs of the unused gate to GND.  DO NOT TIE any output to a specific logic LEVEL (VCC or GND)!!!
            - 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 using the schematic. (Hint: Verify with the ohm-meter all the connections).
  2.  Do not forget to  supply  d.c power  (Vcc=5V) to  the entire  circuit!!!
  3. 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 Square Wave Clock signal needed by your counter circuit. (Hint: look for the "offset" setting on the function generator).
  4. Use the MSO to ensure that the square wave switches between zero volts and five volts before you apply it to your circuit. Since you may be  using the Agilent MSO 7012B 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 Default Set-up Button.
  5. 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 binary values (preferable)  or hexadecimal.
    - Press "Digital -> D7 Thru D0" to activate digital display,
  6. You can try several options to  display your waveforms:
    - 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,
  7. Verify that your hardware meets specification for each of the sixteen possible inputs.
  8. Demonstrate your finished circuit to the instructor.

All done!

bullet Clean up your work area
bullet Remember to submit your lab notebook for grading at the beginning of next week's lab.
bullet The   lab report should include:

-Prints of the oscilloscope's screen showing the input (x) and output signals (y) at two different frequencies (Low -KHz range, High-MHz range). Please annotate and label the waveforms to show that lab's results match simulation and truth table.

-Settings of the equipment that you are using for this lab.

-Conclusions and/or any special notes regarding this lab ( like problems that you had, how you solved them, debugging issues etc..).