Multisim Digital Primer
Multisim Digital Primer
Multisim Digital Primer
Digital Primer
to accompany
Digital Electronics
Principle and Applications
Seventh Edition
by
Roger L. Tokheim
Published by McGraw-Hill, an imprint of The McGraw-Hill Companies, Inc., 1221 Avenue of the Americas, New York, NY 10020.
Copyright 2008 by The McGraw-Hill Companies, Inc. All rights reserved. The contents, or parts thereof, may be reproduced in print form
solely for classroom use with
DIGITAL ELECTRONICS
provided such reproductions bear copyright notice, but may not be reproduced in any other form or for any other purpose without the prior
written consent of The McGraw-Hill Companies, Inc., including, but not limited to, in any network or other electronic storage or transmission,
or broadcast for distance learning.
Contents
Introduction....................................................................................................................................................3
Work Area.......................................................................................................................................................4
Opening a File.............................................................................................................................................6
Running a Simulation ..................................................................................................................................8
Saving a File ...............................................................................................................................................9
Components.................................................................................................................................................11
Logic Gates...............................................................................................................................................15
Sources.....................................................................................................................................................18
Measurement Equipment ............................................................................................................................24
Multimeters ...............................................................................................................................................25
Oscilloscopes ............................................................................................................................................27
Voltage and Current Meters ......................................................................................................................30
Logic Analyzer ..........................................................................................................................................31
Logic Converter.........................................................................................................................................33
Indicators ..................................................................................................................................................37
Circuit Examples..........................................................................................................................................39
Example 1 Voltage measurement using a voltmeter. ...............................................................................39
Example 2 Voltage measurement using a Generic Multimeter in a series DC circuit...............................40
Example 3 Voltage measurement using an Agilent Multimeter ................................................................41
Example 4 The use of switches and probes to test the function of an AND gate. ....................................43
Example 5 The use of switches to verify the function of a Seven Segment Display. ...............................45
Example 6 Voltage measurement using a Generic Oscilloscope in a Counter circuit. .............................47
Example 7 Voltage measurement using the Agilent Oscilloscope in a Counter circuit.............................50
Example 8 Frequency and Voltage measurement using
the Tektronix Oscilloscope in a Counter circuit. ....................................................................54
Example 9 Using the Logic Analyzer to view the output of a Counter circuit............................................59
Conclusion ...................................................................................................................................................62
Introduction
MultiSim is an interactive circuit simulation package that allows the student to view their circuit in
schematic form while measuring the different parameters of the circuit. The ability to create a
schematic quickly and then analyze the circuit through simulation makes MultiSim a wonderful
tool to help students understand the concepts covered in the study of electronics.
This appendix will introduce the reader to the features of MultiSim that directly relate to the study
of Digital Electronics. The topics covered are:
Work Area
Opening a File
Running a Simulation
Saving a File
Components
Sources
Measurement Equipment
Indicators
Circuit Examples
Work Area
The power of this software lies in its simplicity. With just a few steps, a circuit can be either
retrieved from disk or drawn from scratch and simulated. The main screen, as shown in Figure 1,
is divided into three areas: The drop down menu, the tool bars, and the work area.
The drop down menu gives the user access to all the functions of the program. Initially, the user
will only utilize a few of the different menu selections. Each of the drop down menu main topics
can be accessed by either a mouse click or by pressing the <Alt> key and the underlined letter.
For example, to access the File menu simply press <Alt><F> at the same time. The File menu
will drop down as shown in Figure 2.
Initially, there are only two selections from the drop down menu that need be mastered: Opening
a file and saving a file. The rest of the menu options can be explored as time permits.
The tool bars beneath the drop down menu provide access to all of the menu selections.
Typically, a user will access them through the tool bars instead of the drop down menus. The
most important icon in the assorted tool bars is the on-off switch. The on-off switch starts and
stops the simulation. The push button next to the on-off switch will pause the simulation.
Pressing the Pause button while the simulation is running allows the viewing of a waveform or
meter reading without the display changing.
Opening a File
To open a file, either mouse click on the word File located on the drop down menu bar and then
mouse click on the Open command or mouse click on the open folder icon located on the tool bar
as shown in Figure 3. Both methods will cause the Open File dialog box shown in Figure 4 to pop
open. Navigate to the appropriate folder and retrieve the file needed.
Running a Simulation
Once the circuit is constructed in the work area of the screen, the simulation must be started.
Until the simulation is started, the instruments will not display correct values.
The simulation can be started three ways:
1. Selecting Simulate from the drop down menu and then selecting Run.
2. Pressing the <F5> key.
3. Pressing the toggle switch with a mouse click.
All three of these ways are illustrated in Figure 5.
Saving a File
If the file has been constructed or modified, it needs to be saved under a new file name as the
default file name is Circuit1. As shown in Figure 6, select File with a mouse click located on
the drop down menu bar. Then select Save As from the drop down menu. This will cause the
Save As dialog box to open. Give the file a new name and press the save button with a
mouse click. The process is demonstrated in Figure 7.
10
11
Components
There are two kinds of component models used in MultiSim: Those modeled after actual
components and those modeled after ideal components. Those modeled after ideal
components are referred to as virtual components. There is a broad selection of virtual
components available, as shown in Figure 8.
The difference between the two types of components resides in their rated values. The virtual
components can have any of their parameters varied, whereas those modeled after actual
components are limited to real world values. For example, a virtual resistor can have any value
resistance and percent tolerance as shown in Figure 9.
12
The models of the actual resistors are limited to standard values with either a 1% or 5%
tolerance. The same is true for all other components modeled after real components, as shown
in Figure 10. This is especially important when the semiconductor devices are used in a
simulation. Each of the models of actual semiconductors will function in accordance with their
data sheets. These components will be listed by their actual device number as identified by the
manufacturers. For example, a common diode is the 1N4001. This diode, along with many
others, can be found in the semiconductor library of actual components. The parameters of the
actual component libraries can also be modified, but that requires an extensive understanding of
component modeling and is beyond the scope of this appendix.
If actual components are selected for a circuit to be simulated, the measured value may differ
slightly from the calculated values as the software will utilize the tolerances to vary the results. If
precise results are required, the virtual components can be set to specific values with a zero
percent tolerance.
Two of the components require interaction with the user. The switch is probably the most
commonly used of these two devices. The movement of the switch is triggered by pressing the
key associated with each switch as shown in Figure 11. The key is selected while in the switch
configuration screen, Figure 12. If two switches are assigned the same key, they both will move
when the key is pressed.
13
Figure 11 Switches
The second component that requires interaction with the user is the potentiometer. The
potentiometer will vary its resistance in predetermined steps with each key press. The pressing
of the associated letter on the keyboard will increase the resistance and the pressing of the
<Shift> key and the letter will decrease the resistance. As shown in Figure 13, the percent of the
total resistance is displayed next to the potentiometer. The incremental increase or decrease of
resistance is set by the user in the configuration screen. The associated key is also set in the
configuration screen as shown in Figure 14.
Figure 13 Potentiometer
14
15
Logic Gates
The logic families are represented for both TTL and CMOS integrated circuits (IC). The logic
gates are shown as a single gate, not the entire IC. If an IC contains more that one logic gate,
the schematic symbol for the gate will contain a letter designation. For example, the 7408N is a
quad 2-input AND gate. The logic gates located inside the 7408N are designated A, B, C, and D.
The process for selecting a logic gate is shown in Figure 15. The user selects either the TTL or
CMOS family of integrated circuits. Then the IC family is selected and finally the specific IC.
Once the IC is selected, MultiSim will prompt the user as to which logic gate inside the IC is to be
used. In Figure 15 the 7408N was selected. The 7408N is a quad 2-input AND gate. Therefore
the user will have to choose from gates A through D as shown in Figure 16.
The schematic symbol for the 2-input AND gate will contain two important pieces of information.
The IC number will have a U prefix. The IC number will follow, with an A through D suffix
designating the specific gate within the IC, as shown in Figure 17.
16
To change the properties of the logic gate, right mouse click on the gate and either select
Properties from the pop-up menu or type <Ctrl><M> as shown in Figure 18 or simply double
mouse click on the logic gate. This will cause the configuration screen to pop up as shown in
Figure 19.
17
The logic families contain a comprehensive assortment of components from each family. This
includes logic gates, flip flops, counters, adders, and shift registers. Also included are encoders,
decoders, and memory devices.
18
Sources
In the study of Digital Electronics, all of the circuits contain a DC voltage source to supply power
to the integrated circuits. A significant number of circuits also require a clock signal. The DC
voltage source can be represented two ways: As a battery in Figure 20 and as a voltage supply.
The voltage rating is fully adjustable. The default value is 12 VDC. If the component is double
clicked, the configuration screen shown in Figure 21 will pop up and the voltage value can be
changed.
19
Figure 22 contains the VCC voltage supply used in Digital Electronics circuits.
The voltage rating is fully adjustable for the VCC voltage supply. The default value is +5 VDC. If
the voltage supply is double clicked, the configuration screen shown in Figure 23 will pop up and
the voltage value can be changed.
The DC voltage sources are located on the drop down menu under the Power Source icon. To
view the Power Source drop down menu, mouse click on the arrow next to the Power Source
icon. The DC voltage sources can then be selected as shown in Figure 24.
20
21
The clock signal is produced by either the Voltage Clock source or the function generators. The
clock signal is typically comprised of a square wave alternating at a specific frequency, between 0
and +5 volts shown in Figure 25.
The Voltage Clock source is located on the drop down menu under the Signal Source icon. To
view the Signal Source drop down menu, mouse click on the arrow next to the Signal Source
icon. The Voltage Clock source can then be selected as shown in Figure 26.
22
MultiSim provides two function generators: The Generic model and the Agilent model. The
Agilent model 33120A has the same functionality as the actual Agilent function generator.
The Generic function generator icon is shown in Figure 27, along with the configuration screen.
The configuration screen is displayed when the function generator icon is doubled clicked. The
generic function generator can produce three types of waveforms: Sinusoidal wave, triangular
wave, and a square wave. The frequency, duty cycle, amplitude, and DC offset are all fully
adjustable.
23
The Agilent function generator is controlled via the front panel as shown in Figure 28. The
buttons are pushed by a mouse click. The dial can be turned by dragging the mouse over it or
by placing the cursor over it and spinning the wheel on the mouse. The latter is by far the
preferred method.
MultiSim requires a ground to be present in the circuit in order for the simulation to function
properly. The circuit must contain a ground and all instrumentation must have a ground
connection. The schematic symbol for ground is shown in Figure 29.
Figure 29 Ground
24
Measurement Equipment
MultiSim provides a wide assortment of measurement equipment. In the study of Digital
Electronics, the three main pieces of measurement equipment are the Multimeter, the
Oscilloscope, and the Logic Analyzer. The measurement equipment is located on the
Instrumentation toolbar, shown in Figure 30.
25
Multimeters
There are two Multimeters to choose from: The Generic Multimeter and the Agilent Multimeter.
The Generic Multimeter will measure current, voltage, resistance, and decibels. The meter can
be used for both DC and AC measurements. The different functions of the meter are selected by
mouse clicking on the icon to the left in Figure 31. The mouse click will cause the Multimeter
display to pop up. The different functions on the display can be selected pushing the different
buttons via a mouse click.
The Agilent Multimeter icon and meter display are shown in Figure 32. The display is brought up
by mouse clicking on the Agilent Multimeter icon. This Multimeter has the same functionality as
the actual Agilent Multimeter. The different functions are accessed by pushing the buttons.
This is accomplished by mouse clicking on the button. The input jacks on the right side of the
meter display correspond to the five inputs on the icon. If something is connected to the icon, the
associated jacks on the display will have a white X in them to show a connection.
26
27
Oscilloscopes
There are three types of oscilloscopes to choose from: The Generic oscilloscope, the Agilent
oscilloscope, and the Tektronix oscilloscope. The Generic oscilloscope shown in Figure 33 is a
dual channel oscilloscope. The oscilloscope display is brought up by mouse clicking on the
oscilloscope icon. The settings can be changed by clicking in each box and bringing up the scroll
arrows.
A four channel Generic oscilloscope is also available. As the four channel Generic oscilloscope
is very similar to the dual channel Generic oscilloscope it will not be addressed in this appendix.
The Agilent oscilloscope icon in Figure 34 has all of the functionality of the Model 54622D dual
channel oscilloscope. The Agilent oscilloscope is controlled via the front panel as shown in
Figure 35. The buttons are pushed by a mouse click. The dials can be turned by dragging the
mouse over it or by placing the cursor over it and spinning the wheel on the mouse. The latter is
by far the preferred method.
28
The Tektronix oscilloscope icon shown in Figure 36 has all of the functionality of the Model
TDS2024 four channel Digital Storage oscilloscope. The color of the four channels is the same
as the channel selection buttons on the display: Yellow, blue, purple, and green for channels one
through four respectively. The Tektronix oscilloscope is controlled via the front panel as seen in
Figure 37. The buttons are pushed by a mouse click. The dials can be turned by dragging the
mouse over it or by placing the cursor over it and spinning the wheel on the mouse. The latter is
by far the preferred method.
29
30
31
Logic Analyzer
The logic analyzer allows the user to view up to sixteen digital signals simultaneously. The timing
for the sampling of the signals can come from an internal clock or from an external clock source.
The logic analyzer icon is shown in Figure 40.
When the logic analyzer icon is double clicked, the instruments display pops up. The display in
Figure 41 shows the waveforms for the sixteen input channels, the internal clock, the external
clock, the clock qualifier, and the trigger qualifier. Only the basic functions of the logic analyzer
will be explored at this time. Further exploration of the logic analyzer can be accomplished with
the help of the MultiSim Help menu.
Up to sixteen input waveforms can be connected to the logic analyzer icon. The internal clock
can be used to set the sampling rate, or the external clock connection can be used to bring in an
external signal to be used as the clock.
32
33
Logic Converter
The Logic Converter is a virtual instrument. This virtual instrument can perform several unique
conversions that are very useful in the study of Digital Electronics. The logic converter can
perform the following conversions:
The logic converter is located on the Instrumentation tool bar. The logic converter icon is shown
in Figure 43.
When the logic converter icon is double clicked, the instruments configuration screen pops up as
shown in Figure 44. Only the basic functions of the logic converter will be explored at this time.
Further exploration of the logic converter can be accomplished with the help of the MultiSim
Help menu.
34
The two most fundamental uses of the logic converter is the conversion of a truth table to its
Boolean expression and the simplification of that Boolean expression. As shown in Figure 45,
there are three steps involved in creating a truth table and then converting it to its Boolean
expression.
Choose the desired output for each set of input conditions. A logic 0, a logic 1, or a
Dont Care X can be selected.
The Boolean expression will be displayed at the bottom of the configuration screen.
Once the Boolean expression is obtained, it can be simplified with just one more button press as
shown in Figure 46.
35
Using the Boolean expression displayed, the logic converter can create a circuit from the
expression. The conversion from the Boolean expression to an actual circuit requires a single
button press, as shown in Figure 47.
36
The universal NAND gate is often used to construct combinational circuits. The logic converters
ability to create a circuit comprised of only NAND gates from the Boolean expression in Figure 47
is demonstrated in Figure 48.
Figure 48 Circuit creation using the NAND gate from a Boolean expression
37
Indicators
MultiSim provides very easy to use indicators to give visual feedback to the user. Indicator
probes and seven segment displays are often used to provide information to the user. A typical
use of an indicator probe is to display the logic level of the output of a logic gate. The two circuits
in Figure 49 show the two logic conditions. The probe on the left indicates a logic 1 is present at
the output of the AND gate. The probe on the right indicates a logic 0 is present at the output of
the AND gate.
The default voltage level needed to light the lamp is 2.5V. This value can be changed in the
probes configuration screen. If the probe is double clicked, the configuration screen shown in
Figure 50 will pop up and the voltage value can be changed.
The probes are available in a variety of colors. The different colors can be useful in tracing a
signal through a logic circuit. The different colors the logic probes come in are shown in Figure
51.
38
Seven segment displays are often used in digital circuits to provide feedback to the user. The
seven segment display is available with a common anode or a common cathode. The display
comes in the five colors shown in Figure 52.
The default current level needed to light the lamp is 10 mA. This value can be changed in the
displays configuration screen. If the display is double clicked, the configuration screen shown in
Figure 53 will pop up and the current value can be changed.
39
Circuit Examples
Example 1 Voltage measurement using a voltmeter.
A voltmeter in Figure 54 is placed in parallel with the resistor to measure the voltage across it.
The default is set for DC measurement. If AC is required, double click on the meter to bring up
the configuration screen. All circuits must have a ground. Figure 55 contains a Quick Hint on the
use of the Voltmeter.
40
41
42
43
Figure 60
Switches as inputs
44
By cycling through each switch combination, the truth table for the AND gate can be verified
experimentally. The results of each switch combination are shown in Figure 62A through D.
Table 1, Truth Table for a 2-Input AND gate
A
B
X
Status of Probe
0
0
0
Off
0
1
0
Off
1
0
0
Off
1
1
1
On
45
This particular seven segment display is a common anode device. A ground at the inputs A
through G causes each of the respective LED segments to light up.
46
Numbers and letters used in Hexadecimal can be formed by tying multiple pins to ground. In
Figure 65, pins A, B, C, D, E, and F are tied to ground and the number zero is formed.
47
48
49
50
51
52
53
54
55
Using volts per division and the seconds per division settings, the amplitude and frequency of the
waveform in Figure 75 can be determined. The amplitude of the waveform is two and one half
divisions above zero volts. (The yellow arrow points to the zero reference point.) The volts per
division setting is set to 2 V per division.
V = 2.5 divisions x
2V
division
V = 5V
The period of the waveform is measured to be 100 mS. Since frequency is the reciprocal of the
period, the frequency can be calculated.
F=
1
T
1
100 mS
F =10 Hz
F=
56
The Tektronix oscilloscope can also perform the voltage and frequency measurements
automatically through the use of the Measure function. The four steps and the resulting display
are shown in Figures 76 and 77. To set-up the oscilloscope to measure these values
automatically:
1.
2.
3.
4.
5.
Figures 78, 79 and 80 contain Quick Hints on the use of the Tektronix oscilloscope.
57
58
59
Figure 81 Using the Logic Analyzer to view the outputs of a Counter circuit.
60
Figures 83, 84 and 85 contain Quick Hints on the use of the logic analyzer.
61
62
Conclusion
The ability to create a schematic quickly and then analyze the circuit through simulation makes
MultiSim a wonderful tool to help students understand the concepts covered in the study of Digital
Electronics.
This appendix introduced the reader to the features of MultiSim that directly relate to the topics
covered in this textbook. The features covered in this appendix will help the student to explore
the topics of this textbook to their fullest extent.