Anda di halaman 1dari 11

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.

Breadboard/Workspace Filename

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 11

Logic Gates Parts Bin

2-Input OR Gate

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. Lets 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 11

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.

Vcc Ground Battery

EWB_Digital

Page 3 of 11

Using a BATTERY (DC voltage source) with a Gound as Power Supply If 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 Supply If 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 11

Red Probe

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

Activate Simulation

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 A B 0 0 0 1 1 0 1 1 OUTPUT F ? ? ? 1

Troubleshooting: Notice that the circuit we built can only simulate 1 out of 4-possibleinput 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 11

Switch

EWB_Digital

Page 6 of 11

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. 2. 3. 4. 5. 6. Logic Circuit Truth Table Truth Table Boolean Expression Truth Table Simplified Boolean Expression Boolean Expression Truth Table Boolean Expression Logic Circuit 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.

Instrument Bin Logic Converter

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.
1 Output Terminal 8 Input Terminals

Logic Converter icon:

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 7 of 11

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.

8 Input Terminals (A to H)

1 Output Terminal

Boolean expression goes here

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


EWB_Digital Page 8 of 11

EWB_Digital

Page 9 of 11

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: Truth Table

If you want this: Boolean Expressions Simplified Boolean Expressions Logic Circuit

Click the option(s) in sequence:

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 10 of 11

EWB_Digital

Page 11 of 11

Anda mungkin juga menyukai