LogicWorks tips
Disclaimer
- These excellent hints are shamelessly stolen from previous quarters
of Alex Orailoglu's 140L course.
Display
- Use binary probes or hex displays. Make sure that all input pins
on a hex display are connected to a signal (don't leave floating
pins)
Input
- Use binary switches or hex keypads. When using hex keypads, make
sure that you know which pins are the most significant and which are the
least significant. Many errors occur when people get the pins
backward.
Learning new parts
- If you are not sure what a part does, you should make a new file
with only that part. Hook up binary switches to each of the input pins
and binary probes to each of the output pins. Experiment and try to
understand exactly how the input affects the output.
Getting rid of messy wiring.
- Use busses. Under the "Schematic" Menu item choose "New
Breakout..." Describe the pins you want on your bus. If you want pins
labeled A0, A1, A2, A3, A4, A5 you can just type A0..5 and LogicWorks
will know what you mean. The bus will collapse many signals into one line
(slightly thicker than a regular wire). To use the signals on the bus you
will need to use another breakout. Make sure that the names on both
breakouts match.
- Don't use wires at all. You can skip wiring altogether by labeling
pins. If you label two pins the same thing, LogicWorks will treat them as
if they are connected. This means that you need to be very careful to
make sure that all of the names are spelled correctly. Also make sure
that two signals that are supposed to be separate are not named the same
thing. 0 and 1 are "reserved" names. If you name a pin 0, LogicWorks
will connect that pin to ground (logic 0). If you name a pin 1,
LogicWorks will connect that pin to +5V (logic 1). Also make sure that
you name the end of the pin (the name should appear in pink on the
schematic).
Debugging
- Examine the output of parts to see that it matches what you expect.
There are 5 possible values for an output signal (0,1,X,C,Z) . 0 and 1
are logic values. X usually occurs when a part has floating inputs. For
example, if you have a hex display and ground 3 inputs, but leave the
fourth unconnected, it will display a value of X. C indicates a conflict.
If you connect ground to a binary switch set to 1, the wire connecting
them will have a logic value of 0. Unconnected input pins have a value of
Z.
- If you find that an output is X or C, trace the source of that
problem backwards through the circuit.
Creating new parts
- Create the circuit that will be the inside of the new part
- Use a "Port In" part for each of the input pins for the new
device. Make sure they are all labeled. To label a "Port In" part,
first place the part in the schematic, then click on the text button
(the one that looks like the letter 'A'). Type the name of the port
in the text box that appears next to the "Port In."
- Use a "Port Out" for each of the output pins for the new
device. Name each "Port Out" according to the steps described above.
- Under the "File" menu item, choose "New." In the window that
pops up choose "Device Symbol" and click on the button "OK." There
should be a blank schematic on the screen. Alternatively, you can use
File->Libraries->New Part.
- Under the "Options" menu item choose "Subcircuit/Part Type..."
- In the window that pops up, choose "Create a sub-circuit symbol
and select an open circuit to attach to it."
- Select the appropriate circuit from the window that pops up and
click "OK"
- Click, the "Done" button. The list of Ports should appear on
the left side of the screen. If it does not, you may not have
labelled them correctly. Start over from step 2.
- Now you will create a symbol for your part. The easiest way to
do this is to select "Auto Create symbol..." under the "Options" menu
item.
- Type the name of each of the ports in one of the text boxes in
the window that pops up (left pins, right pins, etc.). I usually put
all of the input pins in the "Left Pins" box and all of the output
pins in the "Right Pins" box. If you want pins names A, B, C, D to
appear on the left side of the part, type "A B C D" (no quotes) in the box
"Left Pins." It is important that you type the name of every pin in the
circuit and don't type any pin names that do not appear in the circuit.
When you are done, click the "Generate Symbol" button.
- Now save your part in an appropriate library. (File..Save). For
this class, you should make your own library and save your parts in
it.
- Now you can place your part in another circuit. You probably
want to test your part first though.