| ||||
|
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. |
||||
| ||||
|
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. |
||||
| ||||
|
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.
|
||||
| ||||
|
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. |
||||
| ||||
|
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. |
||||
| ||||
|
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 (
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
(
Part 5-Connecting the Parts / Wiring The next step is to connect the various parts using the wiring tool
(
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
(
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 (
Now, your circuit is complete. This implements the logic function, f = A(B'+C) |
||||
| ||||||||||||||||||||||||||||||||||||||
|
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.
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 (
|
||||||||||||||||||||||||||||||||||||||
| ||||
|
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.
|
||||