::Tutorial #1: Intro to Digital Works 2::  
 

In this lab, you will utilize a piece of software called Digital Works. It is a graphical design tool that enables you to construct digital logic circuits and to analyse their behaviour through real time simulation. How does this fit in with the lab assignments? You will be required to simulate every circuit in Digital Works before coming to class so be prepared to produce a printout of the circuit if asked, in lab. This tutorial will introduce you to the basics of using Digital Works. After this tutorial, you may find it beneficial to go on to tutorial #2: creating/using macros. Macros are another important part of using Digital Works for ECE 201.

 

 

::Downloading Digital Works::  
 

The current version of Digital Works available from the developers site is not free. It is demoware which prevents demo versions of the software from opening files created by other copies of the demo. However, the ECE dept has an older version available that has no such limitations. It is an older version and has a few bugs but it will be the version you are using for this class. It is available here.

 

 

::Starting up Digital Works::  
 

After installing Digital Works (which installs to C:\DWORKS by default), start it up. What you will see should look like the following. This is the user interface for Digital Works. You will notice buttons at the top for various logic gates (covered below) and some other buttons you may not recognize. Also, note the standard windows menus for opening a file, saving a file, printing a file, etc.

 

 

::Digital Works Toolbar - Parts::  
 

Towards the top of the digital works screen, you will notice the following toolbar. These are the various parts you will be using in your circuit (if you dont recognize some of them, don't worry because we dont use them all)

These are (from left to right): OR gate, NOR gate, XOR gate, XNOR gate, NOT gate (also known as an inverter), AND gate, NAND gate, tri-state buffer, RS latch, JK flip flop, D flip flop, memory device (RAM/ROM), an Switch, Macro embedding, Macro tag, Bit generator, Clock, Interactive input (another switch), GND (0 v), POS(+5 v), LED, 7-Segment LED, Annotation, and the Wiring Tool.

To invoke one of these parts, you simply click on it.

 

 

::Digital Works Toolbar - Simulation Mode::  
 

Below the Parts Toolbar, you will notice another smaller toolbar that looks like the following.

These are the various operations needed to simulate the circuit. These are (from left to right): Play, Stop, Pause, Step, the Object Selector, and the Object Interaction Selector. Play causes the circuit to go into simulation mode. Stop brings it out of simulation mode. The Object Selector is used to select various components of the circuit (selecting/moving a gate, wire, etc) where as the Object Interaction Selector is used to interact with input to the circuit, i.e. switches.

 

 

::Building a Basic Circuit::  
 

Part 1-Introduction to Inputs

Let's say that you want to build and test a circuit that implements the logic function, f = A(B'+C). If you are still unfamiliar with the syntax of writing logic functions, this is a function whose result is A AND-ed with the result from OR-ing C with NOT B (the inverse of B). A quick check shows that we need 1 and gate, 1 or gate, and one not gate. However, we will need some sort of input to use for values of A,B, and C and also some sort of device for output. There are two types of switch inputs available to you. These are the Interactive Switch () and the Interactive Input (). The only difference lies in how the switches get the +5 necessary for providing a logic "1" input. The interactive input requires no external power source to provide both the logic "1" and the logic "0" needed for input which means that you can use it on it's own as an input source. The interactive switch does need some sort of source to provide the logic input. If you select the interactive switch and place it in Digital Works, you will notice that the part looks like the following.

Notice the 2 leads coming off of it. If you are planning on using this for an input where its value will be either +5V (logic 1) or 0V (logic 0), you will need to hook up a POS source on one side and use the opposing side as your input.

If you want my opinion, the interactive input is easier to use and requires less wiring in Digital Works (which is good).

Part 2-Choosing/Placing Gates

As I stated before, you click on a part on the toolbar to select it and then click in the main window to place it. We need one AND gate, 1 OR gate, 1 NOT gate and 3 inputs (A, B, and C). After selecting and placing each one, you will have somethingl like the following.

Part 4-Introduction to Output

The result of this function is either going to be a "1" (TRUE) or a "0" (FALSE) therefore we need some way of displaying what the result is. Digital Works has 2 parts that can be used as output. These are the LED () and the 7-segment LED (). For our application, the LED is better suited. Click on it and place in the circuit.


Part 5-Connecting the Parts / Wiring

The next step is to connect the various parts using the wiring tool (). The way to use the wiring tool is to select it, click on the start point for a wire (valid connections points will display a little message box pop up that says "wire") and then selecting the end point and click on it. If you would like to make an angle in the wire, clicking will stop the old wire and start a new one which is still connected. It is often useful to make all wire "turns" at 90 degree angles. Connecting all of the various things in the circuit yields the following.

Part 6-Labeling Inputs & Outputs

You may be asking how we can tell which input is which. In the above circuit, I have made the mistake of not labeling my inputs and outputs. In this simple circuit, you can probably tell which input is which based on the logic function it is implementing. However in larger circuits, this may not be the case. It is good practice to always label your inputs and outputs. This is done in Digital Works using the Annotation toolbar button (). Select it and then click where you want to add text. This will bring up the following box.

You can put the text in, increase it's size, make it bold, etc. After doing so, select Ok. This will place the Annotation into the circuit. If you made a mistake or would like to change then annotation, first make sure that the Object Selector is selected () and then right click on the annotation you wish to change. A menu will pop up with several options, choose Edit Annotation. After labeling all inputs and outputs, your circuit will look something like the following.

Now, your circuit is complete. This implements the logic function, f = A(B'+C)

 

 

::Simulating a Basic Circuit  
 

For this section, I will be using the circuit that was built above for the logic equation f = A(B'+C). After constructing a circuit, it is vital to verify that its operation is correct. Below, you will find the truth table for this function.

A
B
C
f

0

0
0
0
0
0
1
0
0
1
0
0
0
1
1
0
1
0
0
1
1
0
1
1
1
1
0
0
1
1
1
1

The circuit we built in Digital Works should perform exactly like this table. The first thing to do is put the circuit in simulation mode by selecting the play button (). Select the Object Interaction Selector button (). This allows you to turn the inputs on and off. The next step is to simply cycle through the input combinations and verify that the output is correct. For instance, A = True, B = False, C = False will yield a function result of True. Testing this in the Digital Works circuit gives the following, which is correct.

 

 

::Extending a Logic Gate to have more than 2 Inputs::  
 

Digital Works, by default, creates 2 input logic gates when you select and place them. However, if you need a logic gate with more than 2 inputs, you have 2 options.

Option 1

Several 2 input logic gates can be chained together to create a larger logic gate of that same type. For example, say we need a 4 input OR gate. Combining three 2 input OR gates will yield an equivalent result, logically.

Option 2

The second option is the easier of the two. Place a single 2 input OR gate and right click on it. The menu that pops up will have the choice for Inputs. From this, you can set the gate to have 2, 3, or 4 Inputs. The result is the following.