EE 260, Lab 2:  Designing Circuits in Logicworks

A.  Objectives

B.  Prelab

Read about the Truth Table program, which resides on wiliki.  Set up your wiliki account so that you can run Truth Table.  This means you should set up the path
set path=($path ~ee260/bin)
in your .cshrc file.  If you don't know what this means then you're probably unfamiliar with Unix.  Then see the TA or faculty instructor.

Next, create the following directories and subdirectories somewhere in your account:  EE260/Lab/Lab2/.  In Lab2, use the Truth Table program to enter the following truth table:

Input | Output
a1 a0 | d1 d0
0  0  | 1  1
0  1  | 0  1
1  0  | 0  1
1  1  | 1  0

Save in the two different formats.  See what these files look like using an editor like "vi" or "pico".

Read about programming PROMs in Logicworks.

Be sure to read the rest of this lab assignment, so that you are prepared.

C.  Fun Fun Fun With Logicworks

1.  Warm Up Exercises

Download the Mystery Circuit Parts Library (MCLib), that has two circuits:  Mystery Circuit 1 (MC1) and Mystery Circuit 2 (MC2).  The TA will tell you exactly where to download, e.g., onto the Desk Top or a Temporary folder.  MC1 is a combinational circuit, and MC2 is a sequential circuit.  Start LogicWorks 4 and then upload MCLib.

Select MC1 from MCLib.  Select binary switches and probes from the demolib and attach them to MC1.  Write down the truth table of MC1.

Select MC2 and attach binary switches and probes to it.  "Cloc" is the clock input, and "Cont" is another input.  1" and "Y0" are the outputs.  You may assume that the output equals the state.  
Draw the state diagram of MC2.  .  

2.  Designing a simple combinational circuit

You will design a circuit that adds three bits A, B, and C.  The circuit is called a full adder (FA), and has three inputs (A,B,C) and two outputs (S1,S0).  The output is the binary representation of the sum A+B+C.  For example, if (A,B,C) = (1,1,0) then the sum = 2 and (S1,S0) = (1,0), which is the binary representation of 2.

Write down the truth table of this circuit, and then have the TA check it.

From the truth table, create a HEX file using the Truth Table program.  Then create a PROM in Logicworks and label it "FA".  Due to the limitations of Logicworks, your PROM will have 4 rather than 3 inputs.  Check that the PROM is a full adder by using binary switches and probes.
Don't forget to ground the 4th input (you can find ground in the "connect" or "demolib" libraries).  Demonstrate it to the TA.

3.  Designing a simple sequential circuit

The circuit is called "Counter" and has two inputs.  One of the inputs is the clock input, and the other input is called "Control".  Counter has two outputs (Y1,Y0) which is also the state of the circuit.  Note that the state takes on one of four possible values {0, 1, 2, 3}.  

When Control = 0, the circuit increments its state by 1 with each clock transition, with the exception that if the current state = 3 (the largest possible value) then the next state is 0.  Thus, with each clock transition, the output changes as follows:  .... 00, 01, 10, 11, 00, 01, ......

When Control = 1, the circuit decrements its state by 1 with each clock transition, with the exception that if the current state = 0 (the smallest possible value) then the next state is 3.  Thus, with each clock transition, the output changes as follows: .... 00, 11, 10, 01, 00, 11, .....

Write down the state diagram for this circuit.  Have the TA check it.

You will implement it as a Mealy circuit with a 74175 for the state register and a PROM for the combinational circuit.  

Write down the state transition table for this circuit.  The table should have four columns in the following order:
Current State,  Control,  Next State,  Output(Y1,Y0)
(Note that the Current State should equal the Output(Y1,Y0).)  Have the TA check it.

Build the combinational circuit by (1) creating a HEX file using the Truth Table program, and then (2) create a PROM in LogicWorks.  Verify that your PROM satisfies the truth table.

Build the "Counter" circuit in Logicworks by connecting a 74175 with your PROM.  The 74175 is found in the 7400devs library.  The circuit has a CLR input that you must disable by attaching 5v (which can be found in the connect or demolib libraries).

Attach binary switches at the inputs and logic probes at the outputs.  Debug until it works.  Demonstrate it to the TA when you have it working.

D.  What to Turn In

Turn in a report per team with the following:

Title:  EE 260 Spring 2004
          Laboratory 2 Designing Circuits with LogicWorks.
Team Members:

Your report should have the following three sections.

1.  Introduction

Explain the objectives of the assignment.

2.  Accomplishments

Explain all the tasks you accomplished.  You should have the following figures with appropriate figure captions.  
The figures can be embeded within the text or attached at the end of the report.  

Also explain the equipment you used, what each team member did, and any difficulties you encountered and how you solved them.

3.  Conclusions

Give your conclusions and observations (anything you want to say about the lab).