intro to workbench

16
Electronics Workbench - Digital 1. Start EWB by double-click the EWB shortcut icon, , if it is available on your Microsoft Windows desktop or from the Programs group in the Start menu. The main screen is as shown in the picture below. 2. You then want to assign a name to your file: Choose File > Save As, type or2.EWB under the File n ame box to save the new breadboard/workspace as or2.ewb. Press OK. The filename will then appear in the upper left hand corner of the workspace. See the picture below. 3. Click on the Logic Gates Parts Bin, then click on the 2-Input OR Gate EWB_Digital Page 1 of 16 Filename Breadboard/Workspace

Upload: gil-barte

Post on 28-Apr-2015

24 views

Category:

Documents


2 download

DESCRIPTION

introduction to electronic workbench

TRANSCRIPT

Page 1: intro to Workbench

Electronics Workbench - Digital

1. Start EWB by double-click the EWB shortcut icon, , if it is available on your Microsoft Windows desktop or from the Programs group in the Start menu. The main screen is as shown in the picture below.

2. You then want to assign a name to your file: Choose File > Save As, type or2.EWB under the File name box to save the new breadboard/workspace as or2.ewb. Press OK. The filename will then appear in the upper left hand corner of the workspace. See the picture below.

3. Click on the Logic Gates Parts Bin, then click on the 2-Input OR Gate symbol and drag it out onto the workspace.

EWB_Digital Page 1 of 14

Filename Breadboard/Workspace

Page 2: intro to Workbench

Tip: To change the number of inputs for a gate, just double-click on the gate to open the Gate Properties dialog box (see picture below). Notice that you can increase the number of inputs to a maximum of 8 for the 2-input OR gate.

4. Now label the gate by double-click on the logic gate symbol. Let’s name it as OR2 by typing the name in the Label box as shown below.

The name will then appear on top of the gate. (Tip: When dealing with a more complex circuit, labeling components help clarify your circuit.)

EWB_Digital Page 2 of 14

2-Input OR Gate

Logic Gates Parts Bin

Page 3: intro to Workbench

Tip: To get help on this 2-input OR gate or any component and test instrument, just click on it using the left mouse button and choose Help. The following picture shows the help menu for a 2-input OR gate.

5. For the inputs (power supply), you can choose from the following options:a) Use a BATTERY (DC voltage source) with a Gound.b) Use a +Vcc Voltage Source with a Gound.

EWB_Digital Page 3 of 14

GroundBattery

Vcc

Page 4: intro to Workbench

Using a BATTERY (DC voltage source) with a Gound as Power SupplyIf you are using a Battery and a Gound, then connect your circuit as shown in the picture below. To reflect the nature of digital circuit, change the voltage of the Battery to 5V from 12V.

Using a +Vcc Voltage Source as Power SupplyIf you are using a +Vcc Voltage Source, then you should connect the circuit as shown in the picture below. The +Vcc Voltage Source holds a +5 volts that corresponding to a binary "1" or logical TRUE.

6. To visualize the output values (simulation results), drag a Red Probe onto the workspace from the Indicators Parts Bin. Rotate the Red Probe to the way you want it (Right click on the gate > Rotate). (Note: The numbers of Red Probe you need is equal to the number of outputs your circuit has.)

EWB_Digital Page 4 of 14

Red Probe

Page 5: intro to Workbench

Now connect the Red Probe as shown in the picture below.

7. To simulate your circuit, just TURN ON the electronic bound power switch by clicking on the Activate Simulation switch located at the upper right hand corner.

8. You should see the Red Probe turn “red” indicating a logic ‘1’ or HIGH when both inputs A and B are HIGH. Now you can fill the truth table of a 2-input OR gate as follow:

INPUTS OUTPUT

A B F0 0 ?0 1 ?1 0 ?1 1 1

Troubleshooting: Notice that the circuit we built can only simulate 1 out of 4-possible-input arrangement, so we have a problem. To fix the problem, you need to add 2 simple switches so that you can select which input to turn ON. (Note: The number of switches you need is equal to the total number of inputs your circuit has).

9. To add switches to your circuit, drag a Switch from the Basic Parts Bin. Repeat the process for the 2nd switch.

EWB_Digital Page 5 of 14

Switch

Activate Simulation

Page 6: intro to Workbench

Now connect the switches as shown in the picture below:

The [Space] labeled on the 2 switches indicates that you can toggle the switches ON/OFF by pressing the spacebar on the keyboard. Try it to see it yourself. Remember that the Activate Simulation switch has to be turned on in order to see any result.

Now, you should be able to fill up the truth table as follow:

INPUTS OUTPUTA B F0 0 00 1 ?1 0 ?1 1 1

Troubleshooting: Well, we still have a problem. The problem is that we cannot obtain the outputs of the remaining 2-possible-input arrangement because every time we press the spacebar on the keyboard, the switches close or open at the same time. To solve this problem, double-click one switch at a time, rename the Key in the Value tab of the Switch Properties dialog box from [Space] to [A] and [B] accordingly.

Note that you will need to specify the key that controls the switch by entering its name, provided that the name is available on the keyboard, in the Value tab of the Switch Properties dialog box as shown in the picture below.

EWB_Digital Page 6 of 14

Page 7: intro to Workbench

If you want the switch to close or open when the ENTER key is pressed, rename the Key to ENTER in the Value tab. The following table provides some examples:

To use this key on the keyboard: Rename the Key in the Value tab to this:ENTER ENTERLetter A ALetter Z ZNumber 1 1Number 9 9

You will get an error prompt from EWB if you have entered an invalid key.

10. After the changes, your final circuit should look as shown below:

11. Simulate the circuit for all possible input combinations shown in the truth table.

This time your simulation results should have shown that any combination other than two low inputs resulted in a high output. The final truth table for 2-input OR gate simulated using EWB is displayed below:

INPUTS OUTPUTA B F0 0 00 1 1

EWB_Digital Page 7 of 14

Page 8: intro to Workbench

1 0 11 1 1

This simple example demonstrated that you could build and test the output of a digital logic circuit using EWB without requiring a single physical component.

If you want to work on a new circuit, you can choose File > New. If you want to quit, you can close your file by exiting EWB (choose File > Exit).

EWB_Digital Page 8 of 14

Page 9: intro to Workbench

Using the Logic Converter

Much of the work we have gone through in the previous example can be done quickly and easily using a tool called the Logic Converter from the Instrument Bin. With the Logic Converter, you have the ability to carry out several conversions of a logic circuit representation:

1. Logic Circuit Truth Table2. Truth Table Boolean Expression3. Truth Table Simplified Boolean Expression4. Boolean Expression Truth Table5. Boolean Expression Logic Circuit6. Boolean Expression NAND-gate only logic circuit

You can connect it to a digital circuit to derive the truth table or Boolean expression the circuit represents. You can also use it to produce a logic circuit from a truth table or Boolean expression.

To open the Logic Converter, click on the Instrument Bin as shown below. The Logic Converter is the first instrument to the right, just click and drag it to the workspace.

The picture below shows the Logic Converter that you have placed in your workspace. The little circles on the top are the inputs and output terminals. There are 8 input terminals and 1 output terminal available for use. That means if you want to use the Logic Converter to carry out the conversions, an individual circuit is limited to 8 inputs and 1 output.

Note that the Logic Converter limits your circuit to 8 inputs and 1 output.

To use the Logic Converter, double-click on the Logic Converter icon. Your workspace should now look like the picture below:

EWB_Digital Page 9 of 14

Logic Converter

Instrument Bin

8 Input Terminals

1 Output TerminalLogic Converter icon:

Page 10: intro to Workbench

Notice that the 8 input terminals are labeled as A to H with A as the Most Significant Bit (MSB), and the output terminal is labeled as Out.

The converting options available in the Logic Converter are as follows:

EWB_Digital Page 10 of 14

8 Input Terminals (A to H) 1 Output Terminal

Boolean expression goes here

Page 11: intro to Workbench

Descriptions:

Convert Logic Circuit to Truth Table

Convert Truth Table to Boolean Expression

Convert Truth Table to Simplified Boolean Expression

Convert Boolean Expression to Truth Table

Convert Boolean Expression to Logic Circuit

Convert Boolean Expression to NAND-gate only logic circuit

Now that you have some basic knowledge about the Logic Converter, let’s look at some examples.

To derive a truth table and Boolean expression from a logic circuit using the logic converter

1. Construct the circuit by drawing the components from the gate library.

2. Connect the inputs of your circuit to the input terminals on the logic converter and single output of the circuit to the output terminal on the logic circuit as shown in the figure below.

EWB_Digital Page 11 of 14

Page 12: intro to Workbench

3. Click the logic circuit truth table button. You should get the truth table for the logic circuit in the logic converter.

The truth table shown that the given circuit is that of 2-input AND gate. To convert to Boolean expression and Simplified Boolean expression please refer to Table 1.

EWB_Digital Page 12 of 14

Page 13: intro to Workbench

The following table summarized all possible scenarios that you may encounter:

Table 1: Quick guide to converting a digital circuit using the Logic Converter

If you have this: If you want this: Click the option(s) in sequence:

Truth Table Boolean Expressions

Simplified Boolean Expressions

Logic Circuit

NAND-gate only logic circuit

Boolean Expressions

Truth Table

Logic Circuit

NAND-gate only logic circuit

Simplified Boolean Expressions

Logic Circuit Truth Table

Boolean Expressions

Simplified Boolean Expressions

EWB_Digital Page 13 of 14

Page 14: intro to Workbench

EWB_Digital Page 14 of 14