0 ratings0% found this document useful (0 votes) 177 views138 pagesMultiSim Basics PDF
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here.
Available Formats
Download as PDF or read online on Scribd
Multisim’ Basics
Schematic Capture &
Simulation
Laboratory Workbook
Course Software Version 10.0
August 2007 Edition
Copyright
(©2007 Nona! Inrunents Corporation. lights esared
Under the copyrights, this publication may not be rereduced or tanmited in any form, electron or mechanical incuding photocopying,
recording, storing in an information retieval system, or vansating, in whole or in part, witout the pir writen consent of Natonal Instruments
Corporation
National instruments respects the intelectual property of ators, and we ask our users to do the same. NI software i protected by copyright
‘and oerintlecia property laws. Where NI sofware may be used to reproduce software or other materials belonging lo others, you may use
[software ony to reproduce materials that you may reproduce in accordance withthe tems of any apple license or oer logalresticton,
SIMS and BSIM are developed by the Device Research Group ofthe Department of Electrical Engineering and Computer Science,
University of Califo, Berkeley and copyrighted by the University of Calfomia,
‘The ASNS cross assembler bundied wih Mulisin MCU isa copytighled product of MetaLink Cop. (xu metaiice . com).
MPASM™ macro assembler and related documentation and terature i reproduced and distributed by Electronics Workbench under license
‘fom Nicochip Technology ine. Alrighs reserved by Microchip Technology Inc. MICROCHIP SOFTWARE OR FIRMWARE AND
LITERATURE IS PROVIDED “AS IS," WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO.
‘THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
MICROCHIP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY ARISING OUT OF OR IN CONNECTION WITH THE.
SOFTWARE OR FIRMWARE OR THE USE OF OTHER DEALINGS IN THE SOFTWARE OR FIRMWARE.
‘Trademarks
National Instruments, NI nicom, and LabVIEW are trademarks of National Instruments Corporation. Refer to the Tems of Use section on
‘ni. con/ Legal for mor information bout Nationa Instruments trademarks, Ultiboard is a registered trademark and Multi and
Electronics Wortbench ae trademarks of Elecronics Workbench. Othe product and company names mentioned herein ar trademarks or
trade names of ther spective companies.
ember ofthe National Instruments Aliance Parner Program are business entities independent fom National Instruments and have no
agency, parinership or jon venture relaonship wih National Instruments,
Patents
For patents covring Natio Instuments products, eer othe appropriate locaton Help » Patents or ni . com/patent:s. Some parions
ofthis produc are protected under United States Patent No.6 560,572,‘Worldwide Technical Support and Product Information
National Instruments Corporate Headquarters
11500 North Mopac Expressway Austin, Texas 78759-3504 USA Tel: 512.683 0100
Worldwide Offices
‘Ausra 1800 300 800, Austria 43 0 662 4579 90 O, Belgium 32 02757 0020, Braz $5 11 3262 3599, Canada 800 433 3488,
(China 86 21 6555 7838, Czech Republic 420 224 225 774, Denmark 45 45 7626 0, Finland 38509 725 72511,
France 3301 48 1424 24, Germany 49 088 741 3130, India 9 8041190000, Israel 972 03 6308737, aly 3902 413001,
Japan Bt 3 5472 2970, Korea 8202 3451 2400, Lebanon 96101 3328 28, Malaysia 1800 887710, Mexico 01 800 0100793,
Nlherands 310 348 433466, New Zeatand 0600 853 322, Naway 47 0 66 9076 60, Poland 48 22 3300160,
Portugal 351 210 311 210, Rusia 7 495 783 6851, Singapore 1800 26 5888, Slovenia 3863 425 4200,
‘South Afica 27 0 11 806 8197, Spain 34 91 40 0085, Sweden 4608 $87 895 00, Switzerland 41 56200 5151
Taiwan 886 02 2377 2222, Talland 662 278 6777, Urited Kingdom 44 0 1635 523545
To comment on Natona Instuments documentation, refer to the Nafonal Instruments Web site a ni .com/in fo and enter te info code
feedback.
(© 2007 National Instruments Corporation. Al ights reserved
‘© Nationa struments Cagevaon Fi pt coinsContents
Student Guide
Installing the Course CD Software.
Course Conventions.
Lab 1: Drawing a Schematic
Sheet Properties
Global Preferences...
Placing Components.
Wiring Components
‘Simulation.
Lab 2: Working with Instruments.
Virtual Instruments.
Circuit Wizards and Measurement Probes
Logie Analyzer.
Logic Converter...
Lab 3: Working with Analyses...
AC Analysis...
The Grapher View.
Transient Analysis...
Fourier Analysis.
Monte Carlo AnalYSiS....r.norn
Lab 4: Working with Results.
Making Precise Measurements, svn AT
Post-processing enn
Lab 5: Advanced Schematic Capture.
Graphic Annotations...
Comments -
Controlling the Drawing Layers .
Title BIOGKS uration
The Spreadsheet View
(© Nationa isruments Carperaton il Nts Laboratory WorkbookLab 6: Communication and Transfer.
Bill of Materials (BOM)
Transfer to PCB Layout...
Lab 7: Working with Projects and Design Sharing ..
Design Blocks (HB and SC)...
Hierarchical Block (HB) Design and Bus Vector Connect.
Finding Components. :
Electrical Rules Check (ERC)
Project Management
Lab 8: Working with Design Variants
‘Adding Design Variants..
Variants in a Hierarchical Design.
Lab 9: Creating Components...
The Component Wizard
The Symbol Editor.
Lab 10: MCU Co-simulation
The MCU Workspa0@ «2.2.0:
Placing and Wiring Peripherals,
Co-simulating MCU and Multi...
Debugging Features
Lab 11: Educational Features (Optional)
Ladder Diagrams. stn se
Circuit Description Box 126
Black BOK... son 129
Virtual Breadboard, 130
Appendix A: Presentation Slides...
Watt Inseumen's Corporation v tp:tawnniconiatsinStudent Guide
Welcome to the NI Multisim Basics Laboratory Workbook. This Laboratory
Workbook and the accompanying software are used in the two-day, hands-on NT
Multisim Basics: Schematic Capture & Simulation course.
‘The labs in this seminar will develop progressively in both content and.
complexity, closely matching the material presented during the discussion
periods. Students will develop various stages of a simple sonar circuit over the
course of the seminar.
Course Description
‘The National Instruments Multisim Basics course introduces the NI Multisim
integrated capture and simulation design environment. Learn how to build a
schematic and evaluate circuit performance through interactive simulation and
advanced analyses. Also discover how to complement your current database of
components by creating custom capture and simulation parts.
Additional topics include microcontroller co-simulation with the NI Multisim
MCU Module and the Education specific features.
What You Need to Get Started
(© Matera nstamentsCoporaton
Before you use this course manual, make sure you have all of the following
items:
(Windows 2000/XP installed on your computer. Windows Vista is supported
if using Multisim 10.0.1 and higher
C_NIMultisim Power Pro Edition (Education Edition is required for Lab 11)
G__NIMuhtisim MCU Module (required only for Lab 10)
1 Accompanying course CD
Installing the Course CD Software
‘The accompanying CD includes all files needed to complete the exercises on this
Workbook. It also includes the NI Circuit Design Suite evaluation software.
Explore the CD and copy the Lab* folders to your local hard drive. It is
‘ommended that you install them in a folder named
\Exercises\Multisim\
Working reference circuits are available for most labs to expedite the lab and to
censure that students always have access to the working circuit. These circuits
have the suffix complete added to the filename.
v tien Labralry WorkbookCourse Goals
(© Nationa stunts Coprston
This course prepares you to do the following:
a
Understand the features of the NI Multisim user interface
Lear to capture schematics in Multisim
Use interactive simulation to check your design
Understand virtual instruments and analyses
Work with design variants
Create custom components
At the end of the NI Multisim Basics course, you can design and simulate a
Circuit that is ready to be transferred to board layout and routing. This hands-on
format is the quickest way to become productive with NI Multisim.
This course is not for the following:
a
oo
a
Teach electronic and electronic design concepts
‘Teach C and/or assembler programming
Develop a complete electronic application for any student in the class
‘Teach PCB Layout design and concepts
vi tpt comnts»
> @ «@
bold
ttalie
monospace
© Nationa nstuments Corporation
Course Conventions
‘The following conventions appear in this course manual:
The » symbol leads you through nested menu items and dialog box options toa
final action,
This icon denotes a tip, which alerts you to advisory information,
This icon denotes a note, which alerts you to important information,
This icon denotes a caution, which advises you of precautions to take to avoid
injury, data loss, or a system crash,
Bold text denotes items that you must select or click in the software; it also
denotes parameter names, controls and buttons.
Italic denotes variables, emphasis, a cross reference or an introduction to a key
concept.
‘Text in this font denotes text or characters that you should enter from the
keyboard. This font is also used for proper names of disk drives, paths,
directories, file names.
vil tise Laberatory Wekbook© National instants Corporation
vil
htpriwnnicommtiinLab 1: Drawing a Schematic
‘This lab provides a general introduction to Multisim’s schematic capture. You
will build and wire a basic circuit in Multisim using a variety of means to access
parts, experiment with the wiring and run a basic simulation.
Goal
1, Become familiar with the general Multisim GUI.
Become familiar with setting Multisim workspace parameters,
Understand the difference between real, virtual, ideal and interactive parts.
Become familiar with the Multisim database structure.
Build and wire a basic circuit (including virtual wiring),
eawsen
Become familiar with and set wiring options.
Reference Circuit Files
The following files are referenced in this exercise. They are located in the
C:\Exercises\Multisim\Lab01 folder:
© 40KFILTERI
© 40KFILTERI_complete
© Up_down
Implementation
1. Open Multisim.
(If Muktisim is not open, select Start » Programs » National
Instruments » Circuit Design Suite » Multisim.
Multisim opens to a default Circuit? file and workspace.
2. Save the default circuit file as 40kF TLTER1
cl » Save As, browse to the folder where you are saving.
your completed exercises, in the File name field type
40kF ILTER1 and click Save.
‘© Natal nraents Cnpraton 1 Naka Laboratory WorkbookSheet Properties
3. Set Sheet Properties parameters.
a
a
Select Options » Sheet Properties.
Select the Cireuit tab; in the Show section check/uncheck the
‘Component subsection parameters like Labels, RefDes, Values and
preview the result on the left pane picture. Configure as desired.
In the Net Names subsection, you choose if you want to have net
names shown for all nets, hide all, or a net-specific setting
(recommended). For this exercise, please choose Show AIL.
In the Color section you can change the colors used in the
workspace. The default is a pre-configured White Background
option. If you want to customize the colors select Custom from the
drop-down list or choose from the pre-configured options.
Select the Workspace tab. In this tab you can tun on or off the grid,
page bounds and the page border. You can also change the sheet size.
Select the Wiring tab. Set the Wire Width to 1 and the Bus Width
to 3, Set Bus Wiring Mode as Busine.
Select the Font tab. You can customize the font to be used in
different sections of Multisim, use the Change All and Apply To
sections to define how the changes need to be applied. Leave the
defaults,
Select the PCB tab. In this tab you can change options that are
applicable when you transfer your design to PCB Layout. Leave the
defaults.
Select the Visibility tab. In this tab you can add custom annotation
layers if needed. Leave the defaults.
Click OK to close the Sheet Properties dialog,
g Tip You can click the Help button located at the bottom of the Sheet Properties dialog at
any time to learn more about the tab and sections where you are at
National Instruments Corporation
2 tpt nicominutsinGlobal Preferences
4. Set Global Preferences parameters.
G_ Select Options » Global Preferences.
(Select the Paths tab and set the Circuit Default Path to
Ci\Exercises\Multisim\. Click Apply.
The Paths tab also configures the location of the databases (Master,
Corporate and User) as well your User Configuration file,
If you are migrating from one computer to another, you can copy your User
Configuration file to have all your configuration settings loaded in the new computer.
G1 Select the Save tab. Configure if you want to have Security Copy
created every time you save the circuit, a Auto-backup that will
save the circuit every interval you specify, and if you want to Save
simulation data with instruments, which allows you to specify
how much data will be saved with the instruments included in your
schematic,
FJ Note Please note that all these saving options willimput the filesize and numberof files that
‘you will have with each circuit you c
(1 Select the Parts tab. In this tab you can select how the Component
Browser behaves every time you place a component, what Symbol
standard to use, Phase Shift direction options and Digital
‘Simulation Settings preference. Leave the defaults.
Select the General tab, You can customize the behavior of many
tasks in this tab such as selecting components, using tl
‘wheel, moving components and most importantly, Wiring. Leave the
defaults.
Click OK to close the Global Preferences dialog,
Ry Note Sheet properties apply to the circuit file you are working with and are saved with the file
self. Global preferences apply to every circuit project you are working with, and do not get
wed with the file, these preferences are saved in your User Configuration file
g Tip Use the mouse scroll wheel to zoom in and out of the workspace.
(© Watna istuments Conaaton 3 Min Laboratory WorkbookPlacing Components
5. Build your own version of circuit 40KFILTERI_complete as pictured in the
next circuit diagram. Instructions and location of components are given in the
next steps.
Rt
input w+] —4
40.2k0,
vi
15V
A0kHz 1K 50% I
0.3V pe fui
AB
R2
191k
a
eve 2 output
— lit
Ro
Luasen
V3
{I
bv
Figure 1-1 Bandpass filter circuit diagram to complete.
(atonal Istuments Corporation
Select Place » Components. Select the Master database and select
the Sources Group.
Select the Signal_Voltage Sources Family and then select the
CLOCK_VOLTAGE component.
To place this component on the workspace, you can double-click the
component and then click to place; or you can click the OK button
and then click to place.
If the Component Browser is set to return after you place the
component you can continue placing new components or click Close
to finish.
4 tpstew icomtntisin‘The following table provides the location for each component
Group Family ‘Component Value | RefDes
Sources | Signal_Voltage Sources | CLOCK_VOLTAGE | 40kHz,03V ] VI
Sources | Power_Sources DC_POWER iv | v2.va
Sources | Power_Sources GROUND
Basic Resistor 40.2 RI
Basic Resistor 191k R2
Basic Potentiometer 1k R3
Basic Capacitor 2710p ca
Analog | Opamp LMBS8N Section A ul
© National nsruments Corporation
6. Rotate components.
(Place the DC_SOURCE (V2) by following the same procedure as
the CLOCK_VOLTAGE (V1) and referencing the previous table.
Once the component is attached to the mouse cursor press
on your keyboard, you will see how the component
rotates, click to place. If the component is already placed, select the
‘component with the mouse and press the keys.
7. Configure virtual components.
(To change the value of the virtual components such as the clock
source and the voltage source, double-click the component, and from
the properties dialog change the parameters according to the circuit
diagram.
‘The In Use List,
DAs you can see in the circuit diagram, there are two 1SV voltage
sources, V2 and V3, if you already placed V2 and configured it
instead of going back to the Component Browser to select a second
voltage source, you can use the In Use List on the Main toolbar (see
the following figure), click the list and select DC_POWER. An
exact copy will be attached to the mouse cursor and you can place it
‘on the workspace to create V3.
5 Matis Laboratory Werkbook(Place the GROUND reference and use the In Use List to place the
other ground references needed.
RESISTOR VIRTUAL
POTENTIOMETER_ VIRTUAL
Icapactror
Figure 1-2 In Use List.
9. Using the Filter to locate components.
1D Inthe Component Browser, select the Basie group, select the
Resistor family and at the top of the component list type 40 . 2, see
how it acts as a filter to find the component you are looking for
(40.2k).
(2 Place the other resistor (R2), the capacitor (C1) and the
potentiometer (R3).
10. Searching for components.
© You will now place the Opamp. In the Component Browser click
the Search button.
11 Inthe Component field, type *358* and click Search, You are
searching for every component that has the string 358 on its name,
(From the list on the results dialog select the LM358N component,
then click OK, this will take you to the exact location where the
Opamp is.
12 On the Model Manuf \ID field select the Motorola model and click
OK to place the component. Since this a multi-section component,
the Section Selector dialog will appear, click section A and place the
‘component.
‘© Natenal nsoments Corporation 6 pit icometisn11. Flip the symbol of a component.
o
Notice how the input terminals (+ and -) of the Opamp are reversed
‘on the circuit diagram. Select the Opamp in the workspace, right-
click and select Flip Vertical, the Opamp you placed on the
‘workspace should now look exactly as the one in the circuit diagram.
Move and position the components similar as in the circuit diagram,
Wiring Components
12. Creating wires.
o
‘To wire your circuit, move the mouse pointer to any component pin,
the pointer changes to a crosshair, left-click and move the mouse to
start a wire branch,
Lefi-click again in the workspace to insert a branch turn, left-click at
the destination pin to finish the wire.
Note Net names are assigned sequentially as you create each one. Net 0 is always assigned to
‘ground references.
0
Experiment creating a blind wire. Click at any component pin, then
move the mouse to start a wire, double-click the workspace area and
the wire will be fixed in the workspace.
Select the previously created wire and press on your
keyboard to delete the wire
Complete the wiring of your circuit,
13. Modify wire properties.
o
a
Nationa Instruments Capoten
Double-click the net of the positive terminal of the clock source (V1)
and change the Net name to input.
Double-click the net of the output terminal of the Opamp (UIA) and
change the Net name to output.
7 ssn Laboratory Workbook14, Placing other objects.
C1. Select Place » Text, create one label with the letter A and one with
the letter B and reference the circuit diagram to position them.
Select Place » Junction, place the two junction dots located
underneath each letter label.
15. Your circuit should now look similar to the circuit diagram of Figure 1-1.
16. Add a second capacitor (C2) between labels A and B with automatic wiring,
Use the In Use List to select the CAPACITOR_VIRTUAL,
‘component.
(0 With the capacitor attached to the mouse pointer, rotate the capacitor
to a horizontal orientation and then place it on top of the wire branch
and click to place. This is an effective way of doing automatic wiring
17. The completed circuit is:
A @2 8B
1
—t
270pF
191k.
input RI a il
— 1
0.2K 270pr 1 fi
IFKG
vl sito BV
fis )AOkHz 50% i
Oe v ese UIA at
o ,
Fi [, Lm35en
L v3
24]
BV
Figure 1-3 Completed circuit
(© National IstumentsCorraton 8 sh contin&)
vec
“Tv
Gun
Key=
Clear
18. Save the circuit.
(Leave Multisim open.
Simulation
Take some time to learn how to start a circuit simulation and how interactive and
animated parts work,
19, Load an existing circuit fie.
(1 Select File » Open. Browse to file:
C:\Exercises\Multisim\Lab01\Up_down
Click Open. An up-down counter circuit is built for you.
Watna istuments Careraton
U3
DCD_HEX_BLUE
ut |
© reco
2a |
c ne ~TALSOON
© wax
vw TALSTB0N
<> 100 Hz
ov
igure 1-4 Up-Down Counter.
9 Matis Labret Werbook20, Simulate the circuit,
i Click the Run/Resume Simulation button on the Simulation
toolbar to start the simulation.
You can tell that the simulation is running if you see the green squares
moving in and out on the lower right comer of the screen.
21. Interactive and animated parts,
With the simulation running, you can toggle the position of any of
the switches if you click the switch itself. These are interactive
‘components.
(2 You can also toggle the switch position by pressing the assigned key
shown at the symbol.
1 Toggle the switches and observe the 7-segment LED display, this is
‘an animated component; observe the behavior of the Digital Probes
as well.
22, Stop the simulation.
a [l_ Click the Stop Simulation button,
23. Close all open circuit files.
1D Select File » Close All
Leave Multisim open for the next exercise.
End of Lab 1
(Nati Inseuments Corporation 10 npn nicomimtiinLab 2: Working with Instruments
Goal
‘You will now use virtual instruments and interactive simulation to examine the
response and behavior of the Bandpass filter from Lab]. The Bode Plotter and.
Oscilloscope will be inserted into a circuit to measure response across the filter
circuit. You will also replace the source with a function generator.
After experimenting with the Bandpass filter, you will use the 555-timer Cireuit
Wizard to generate a 40 kHz signal for a SONAR circuit,
1, Become famitiar with placing instruments, instrument front panels, and
setting instrument controls.
Become familiar with simulation settings.
Use the Bode Plotter to measure frequency response.
Use the Oscilloscope to monitor the circuit's transient response.
yap E
Replace the Clock Source with a Function Generator and observe simulation
results while varying the frequency.
6. Become familiar with the Multisim Circuit Wizards.
Reference Circuit Files
Implementation
(© Natal ramen Corporation
‘The following files are referenced in this exercise, They are located in the
C:\Exercises\Multisim\Lab02 folder:
© 40KFILTER2
© 40kKFILTER2_complete
* 40kSource
* LogicAnalyzerExample
1. Open Multisim. You can close the default Circuit 1 if there is one open.
2. Load circuit file.
You can load the 40kF TLTER1 circuit file that you finished on
Lab1, or you can open 40kF TLTER2 which is already built for you
in the Lab02 folder (recommended).
" isin Laboratory WortbookVirtual Instruments
3. The following is the circuit diagram with the instruments connected. Please
refer to this diagram to complete the exercise.
sms sca
te i
nes ter
ea Site
Ter BA rH
Lae ate
output
I-4
1 wy
Figure 2-1 Bandpass filter with instruments.
4. Replace the clock source with the Function Generator.
(Select the clock source (V1) and press .
Click the Function Generator icon on the Instruments toolbar.
Position the instrument where the clock source was before and click
to place.
Q Tip You can move and hold the mouse pointer on top of each icon and the tooltip showing
the instrument name will show up shortly.
1 Wire the negative terminal (-) to net input, which is the net
attached to RI. And wire the center pin of the instrument (ground) to
a GROUND reference.
(© atonastuments Cagaraton 12 tee. commtisin1 Double-click the Function Generator symbol. The instrument's front
panel opens in a floating window. Configure it as shown in the
following figure
[ Function Generator XP... Ex]
a
i etal ery
re pea
Figure 2-2 Function Generator front panel.
FS Note The font panel on all instruments is lating window, which means you can leave it
‘open and continue working with your circuit or you can close it by pressing the Close upper right
button. If you decide to close it, the settings that you just configured will still be applied to the
instrument.
5. Place the Bode Plotter and the Oscilloscope.
From the Instruments toolbar, select the Bode Plotter and the
Oscilloscope, place them both on the upper right section of the
[I circuit area.
On each instrument you can wire the negative terminals (-) to a
GROUND reference.
JX Note _ In Multisim, if you do not wire a net to the negative terminals (-) ofthese instruments,
Multisim assumes a GROUND reference. However, for best practice purposes, you should
always wire a reference.
(Wire the Bode Plotter positive (+) IN terminal to the input net, and
the positive (+) OUT terminal to the output net.
Wire Oscilloscope positive (+) Channel A terminal to the input net,
and the positive (+) Channel B terminal to the output net.
(© Nationa stunts Corporation 13. Ni tsen Laboratory Wektook1D Open the Bode Plotter and the Oscilloscope front panels and
configure them as shown in the following figures.
‘© Nana istuments Cagraton
Figure 2-4 Oscilloscope front panel.
4 itp: comin6. Change wire colors.
1 Inorder to have a better look and distinguish between input and
output lines you can change the wire color. Right-click any of the
nets wired to the OUT terminal of the Bode Plotter and select
‘Segment Color, then choose a color and click OK.
Repeat the above procedure for the Oscilloscope. Change the color
of the net wired to the Channel B.
g Tip The color of the traces that are drawn on the graph area of these instruments is the color
used on the nets attached to the terminals,
7. Simulate the circuit,
Open the Bode Plotter and the Oscilloscope front panels.
b Simulate the circuit
(1 Observe the traces on both instruments,
Tip Click the Reverse button on the i
of the graph area,
truments’ front panels to switch the background color
(The resulting curves from the two instruments should look similar to
the Following figures.
Bode Plotter
PS
L-
Figure 2-5 Bode Plotter simulation results.
aoa! nsruments Corporation 15, tien Labeatory WortookOscilloscope
Figure 2-6 Oscilloscope simulation results.
8. Modify circuit behavior during simulation mode.
(With the simulation running, change the value of the potentiometer
3, move the mouse pointer on top of the R3 symbol and a
horizontal slider will appear, move the slider to the change the
potentiometer value.
2 You can also change the value by pressing the corresponding Key
assigned to the potentiometer on the keyboard this will move the
value up; press to move the value down.
(1 Observe the response of the circuit to an increase or decrease of the
resistance in R3 on the oscilloscope.
BB Note ‘The Bode Plotter response will be updated only after you restart the simulato
9. Use the Measurement Probe.
1 Close the instruments by pressing the red Close button on the top-
right comer of each front panel.
1D. While the simulation is still running, use the Measurement Probe to
[is] have a quick view of the voltage levels in the circuit. Click the
‘Measurement Probe button on the Instruments toolbar.
(© Nationa stunts Corporation 16 ip: nication(With the Measurement Probe attached to the mouse pointer move it
close to any net (do not click) and check the yellow display area for
electrical information on that spot (see the following figure).
Mip-9): 3.120
(rms): 1.08 ¥
V(de):-7.31
Figure 2-7 Measurement Probe.
10. Stop the simulation.
= (Stop the simulation.
Close any instrument front panel that might still be open.
Circuit Wizards and Measurement Probes
1. Open a new circuit
a Select File » New » Schematic Capture, or click the New button on
the Standard toolbar.
2. Create a 40 KHz clock source with the 555 Timer Wizard.
C2 Select Tools » Circuit Wizards » 555 Timer Wizard.
(Enter the settings as shown in the following figure.
Nato nsmens Corporation 7 Misi Laboratory WorkFigure 2-8 555 Timer Circuit Wizard settings.
Click Build Circuit to close the dialog and click again anywhere in
the workspace to place the circuit.
3. Place and configure a Measurement Probe.
@ Place a Measurement Probe on the output net, select the
Measurement Probe from the Instruments toolbar and click over
the output net of the timer (OUT terminal).
Double-click the yellow display area of the Measurement Probe to
call the Probe Properties dialog.
1D. Select the Parameters tab.
1D Configure the Probe to show only the peak-to-peak voltage (Vp-p)
and the Frequency (Freq.). Click the box located on the header of
the Show column to change all values to No. Then click only on the
rows you want to show to change the cell to Yes.
(Watona stares Caparaon 18 sew iconsOSelect the Display tab.
© Place a checkmark on the Auto-Resize box.
Click OK to close the Probe Properties dialog.
4. Simulate and adjust simulation settings,
F G_ Start the simulation and observe the measurements displayed on the
Measurement Probe. You should notice that the Frequency is smaller
than 40 kHz.
a
Stop the simulation,
Select Simulate » Interactive Simulation Settings. On the first tab,
select the radio button Maximum time step (TMAX) and change
the time step to 1-006.
Click OK to close the dialog,
EP _ Re-start the simulation and observe the new frequency. It is very
close to 40 kHz (~37.8 kHz).
QT _Adjosing sutton eng can improv theres of the smulaton he previous
instruction you made the time step more precise in order to calculate the frequency much better.
Stop the simulation
5. Save the simulation settings.
Select Simulate » Save Simulation Settings. Name the simulation
Profile as Smal1erTimeStep and click Save.
(Insert the description: This simulation profile has a
smaller time step. Click OK to finish.
(© National instants Coporaton 19 Nisin Laboratory WorkbookAdditional Exercise
If time permits, follow this set of instructions to experiment with the Logic
Analyzer and the Logic Converter.
Logic Analyzer
1. Open the Logic Analyzer example.
.
e 2. Select File » Open. Browse to folder:
C:\Exercises\Mult isim\Lab02 and select file
LogicAnalyzerExample.
1 Click Open.
vec -
ov | x
| 2 asy
ue ue
eo
| enone (NOT
ri bee |
Hoan Zk | we
| meme
Figure 2-9 Logic Analyzer example.
2. Adjust simulation settings.
1 Select Simulate » Interactive Simulation Settings. Select the
‘Analysis Options tab.
Select the radio button called Continue without discarding
previous plots. This option will allow the Logic Analyzer to keep
plotting data without resetting the display
Click OK.
€or tunes Coparton
20 pecans3. Adjust Logic Analyzer settings.
(Open the Logie Analyzer front panel.
(2 Under the Clock section click the Set button.
C1 Configure the clock settings as shown in the following figure.
Figure 2-10 Logic Analyzer clock setup.
1 Click Accept.
4. Simulate.
B (1 With the Logie Analyzer front panel open, start the simulation.
(Experiment with the switches. Click the switches to toggle their
status over and over. Make different combinations.
(1 Notice how the Logic Analyzer plot keeps moving and moving.
5. Pause the simulation,
(J Click the Pause Simulation button on the Simulation toolbar.
6. Adjust the Logic Analyzer plot.
In the Logic Analyzer front panel, increase the Clocks/Div field to
about 10 or more. Notice how the horizontal scale of the graph
changes.
‘National nsamentsCopraton 24 Mtn Laboratory Workbook0 Use the scroll bar at the bottom of the plot area to review the
acquired samples.
(D_ The Logic Analyzer should look similar to the following figure.
Figure 2-11 Logic Analyzer front panel.
Q Tip Press at any time when the Logic Analyzer is selected and Multisim Help shows
context specific help for the instrument.
7. Stop the simulation.
@& [1 Stop the simulation.
Chose the Logic Analyzer front panel.
(© Nona! instruments Capraton 22 tp comntsLogic Converter
1. Open a new circuit.
@ O_ Select File » New » Schematic Capture, or click the New button on
the Standard toolbar.
2. Use the Logic Converter.
(Select the Logic Converter from the Instruments toolbar and place
it anywhere on the workspace,
Open the front panel of the Logic Converter.
[Type the following expression on the bottom text field:
ATBIC+A'BC+ABC! +ABC
CEES i _ciickne fourth button, expression to truth table, and see how the
truth table populates.
Figure 2-12 Logic Converter front panel.
Wat nsruments Corporation 23 ‘tis Laboratory Werkeee (1 Click the fifth button, expression to digital logic circuit, and see
how the logical circuit is created based upon the expression entered.
(1 Click the third button, truth table to simplified expression, the
previous expression entered is now simplified.
(3 Continue experimenting with the Logic Converter, you can use the
‘mouse to set truth table values, select inputs, and so on,
3. Close files.
Close the Logic Converter dialog.
1. Select File » Close AI, and leave Multisim open for the next
exercise.
End of Lab 2
‘Natal Insbunents Corporation 24 tps.comtntsinLab 3: Working with Analyses
Goal
You will further explore the characteristics of the Bandpass filter using analyses.
You will use AC, Transient, Fourier and Monte Carlo analyses and learn about
analyses settings and how to configure the Grapher.
1. Compare AC Analysis to a Bode Plot,
Compare Transient Analysis to the Oscilloscope.
Use expressions in analyses.
Understand how to setup and run Fourier Analysis.
Understand how to setup tolerances and run a Monte Carlo Analysis.
auRwp
Learn how to format the output in the Grapher.
Reference Circuit Files
Implementation
© Natoral nstument Copan
‘The following files are referenced in this exercise. They are located in the
Ci \Exercises\Multisim\Lab03 folder:
© 40kFILTER3
‘+ 40KFILTER3_complete
1. Open Multisim,
2. Load circuit file,
Open circuit file 40kFTLTER3 located in the
:\Exercises\Mult isim\Lab03 folder.
3. Review circuit file.
Notice that a load resistance Rload has been added tothe circuit on
the output ofthe filter. This is to facilitate an output power analysis.
25 MMs Laboratory Workbookoutput
Rload
1k
Figure 3-1 Rload added for power analy:
4, Simulate the circuit to get data on the instruments.
1 Check the Function Generator, settings should still be sine
wave, 40 KHz, 1 Vp. Correct those settings in case they are
different.
> Run the simulation.
EY Check the front panel of the Bode Plotter; make sure the data is
plotted.
1 Check the front pane! of the Oscilloscope; make sure the data is
plotted.
C1. Stop the simulation,
1D Close any open instrument,
Tip You can also open and close instrument panels if you double-click the instrument icon on
the workspace.
(© Natal Insraments Corporation 26 tpt nicomimutisinAC Analysis
5. Configure the Output tab of the AC Analysis.
(1. Select Simulate » Analyses » AC Analysis. Or click the arrow on
the Grapher/Analysis List button on the Main toolbar and select
AC Analysis.
C1 Select the Output tab. And verify that the Selected variables for
analysis lst box is emply, if itis not then remove any variables by
selecting them and then click the Remove button,
(From the Variables in circuit box, select All variables from the
drop-down list, and then highlight variable V(output) from the
Click the Add button to move the variable to the right side under
Selected variables for analysis.
6. Add an expression to calculate power. We can calculate the power at the load
resistor Rload with the following formula:
G_ Under the More Options section, click Add device/model
parameter to open its dialog and configure it as shown in the
following figure.
Figure 3-2 Add Model Parameter dialog.
With this diatog you are adding the resistance of Rload as a variable
for the expression. Click OK when ready to continue.
Nationa stuments Cereraton 27 isi aberatony Wertbook(1 Click Add Expression. Configure the dialog as shown in the
following figure.
Figure 3-3 Analysis Expression dialog.
Tip Double-click the variable name or the function Tine to add them into the expression.
@ ©
Note The formula used for power calculation will give a normalized RMS output with respect
to the input voltage. To convert to actual RMS, multiply the result by the square of the peak
voltage as determined by the input function generator. For the purpose of this exercise continue
‘working as described in the instructions.
(Click OK once you are ready to continue, this closes the expression
dialog and puts you back into the Output tab of the AC Analysis
dialog.
(Wat InstumentsCpraton 28 nttewnnicomimtisn7. Verify the output parameters and simulate.
1 The dialog box should look like the following figure.
Figure 3-4 Settings for the AC Analysis.
(Click Simulate to run the AC Analysis.
(Wat nsrumen’s Corporation 29 tise Laboratory WerkThe Grapher View
(3 The Grapher View window opens and the plot should look like the
following figure,
1 40KFILTER3_complete
i AC Analysis
1 100 10k ™M 100M
Frequency (Hz)
Figure 3-5 Grapher View results for the AC Analysis.
1. Click the Reverse Colors button on the toolbar if you want to see a
white background.
F5] Note ‘The Grapher View displays multiple tabs. The las three include one for the
Oscilloscope dats, one for the Bode Plotter data and one for the last AC Analysis. Each time you
run a simulation and/or an analysis the Grapher View adds another tab (page) per
instrumentanalysis.
© National Instuments Corson 30 tptoo.cmtnutsin8. Understand how to work with the Grapher.
2 Make sure the AC Analysis result tab is selected.
Verify the power calculation for Rload. Click the Show/Hide
hE Cursors button on the toolbar.
A pop-up window with the cursor information appears. Move it so
that you can continue working on the Grapher.
Y (On the left side of the first plot (Magnitude) you will notice that a set
of cursors are now visible, click the cursor and drag it to the right,
but before the peak of the trace, and observe the changes on the
cursor information dialog,
(1 Right-click the cursor and select Go to next Y_MAX =>, assuming
that your cursor was located before the peak voltage, this function
will take you directly to the peak of the trace.
(Observe the cursor information dialog, and note how yl shows
1.5129 for V(output) and 2 .2890m for the power expression. Use
the calculator in Windows® and verify that the expression calculated
the power correctly.
9. For the rest of this exercise the power analysis will not be used. Run the AC
Analysis again to remove the expression,
[3 Tocclose the cursor information window click the Show/Hide
Carsors button on the toolbar.
a=) Open the AC Analysis dialog again. On the Output tab highlight the
expression under the variables set for analysis and click Remove.
Only V (output) should now be listed
(Click Simulate to run the analysis. A new tab (page) has the AC
Analysis result without the power calculation.
10. Adjust the Graph Properties of the AC Analysis Magnitude graph.
} (1 Click the Magnitude graph label to make that graph active. A small
red arrow on the left side of the window indicates which graph is
active
(Wats nstuments Corson 31 I sn aboatony WorkbookRight-click the Magnitude left axis and select Axis Properties.
‘The Graph Properties window opens and the Left Axis tab is
selected.
Configure the Left Axis properties as shown in the following figure.
Figure 3-6 New Left Axis properties for the Magnitude plot.
o
o
(© Mata nsburentsCorpraton
Click Apply when done.
Now select the Bottom Axis tab.
In the Scale section select the Logarithmic. In the Range section
type Min: 1000 and Max: 1000000.
Click Apply, and then click OK.11, Adjust the Graph Properties of the AC Analysis Phase (deg) graph.
Right-click the bottom Phase (deg) graph on the left axis and select,
Axis Properties.
(Adjust the Left Axis tab as shown in the following figure.
Figure 3-7 New Left Axis properties for the Phase (deg) plot.
Cl Click Apply.
(J. Select the Bottom Axis tab and change the Range to Min: 1000 and
Max: 1000000.
G_ Click Apply, and then click OK.
‘© Nationa insturents Corporation 33 tien Lateran Workbook12. Compare the outputs of the Bode Plotter and the AC Analysis. Now that you
Ihave set up the graph properties to match those that were used to configure
the Bode Plotter you can overlay the magnitude traces to compare them.
Select the last Bode Plotter-XBP1 tab that holds the data of the
Bode Plotter from the last simulation.
(2. Click the Gain (AB) magnitude plot (top graph) to make it active.
1D. Select Tools » Overlay Traces.
1D. Select Graph_1 of the last AC Analysis, this should be the second
last entry in the list.
Figure 3-8 Select the first graph of the last AC Analysis performed.
O Click OK.
1D Anew tab (page) opens in the Grapher that displays the two traces
overlaid. It looks like the following figure.
Nations nsrurentsCrpraton 34 pew ncarmtisinFigure 3-9 New tab (page) with the overlaid traces.
13. Zoom in to see the region where the two peaks meet each other.
(With the mouse pointer, click and hold while you draw a selection
box around the peaks, this will zoom into that area.
(If the zoom action was not good, you can go back to the original
view. Click the Zoom Restore button on the toolbar and try again to
the make a zoom area around the peaks.
(The graph should look like the following figure.
Water nsromen's Corporation 35 Makai Lbortry Workbook16702
9787
4043
10.957
17872
24787
11765
100.000 ‘27 aOk
Figure 3-10 Zoom view of the traces’ peak point.
J} Note Notice the results ate slightly different. This is because the two methods used diferent
sampling rates, You can contol the sampling rate when you setup the instrument or the analysis,
‘© Nate Inshuments Gegeaton
14, Make precise measurements with the Grapher.
1D Activate the cursors.
(3 Click one of the traces to make it active. The active trace is marked
by a set of outlined arrows,
Drag one of the cursors to the right, right-click and select Go to next
Y_MAX => to reach the peak of the trace.
On the cursor information window read the yI value.
Drag the second cursor to the right, right-click and select Set
'Y_Value => and enter a value that is 3 units less than the maximum
peak value. For example, if the peak value is 6.8651, then set the
second cursor to 3.8651. This will give you -3dB points,
Use the cursor information window to read any other values of
interest.
36 apstwicommatiinTransient Analysis
15. Set up a Transient Analysis.
(Select Simulate » Analyses » Transient Analysis. Or click the
arrow on the Grapher/Analysis List button on the Main toolbar and
select Transient Analysis.
C1 Set the analysis settings as shown below.
: as
Figure 3-11 Transient Analysis parameters.
(National Insturents Comperaton 37 tsi Laboratory Workbook1D. Select the Output tab.
(Select variables V(input) and V(output) and add them to the Select
variables for analysis box.
16. Run the Transient Analysis
1D Click Simulate,
Compare the resulting graph with the Oscilloscope (Oscilloscope-
XSC1) data page on the Grapher. If you notice that the Y and X axis
ranges are different try changing the Axis Properties so that both
graphs have the same range. Use the following figure as reference.
20
13
666.320
66.7
0 250, 500 750. Im
Figure 3-12 Transient Analysis results.
‘To toggle the visibility of the Grapher View (open and close it) you can click the
Grapher/Analysis List button (
(© Natonal Instruments Copraton 38 pte camiMonte Carlo Analysis
20. Set up a Monte Carlo Analysis.
oy Select Simulate » Analyses » Monte Carlo Analysis. Or click the
arrow on the Grapher/Analysis List button on the Main toolbar and
select Monte Carlo Analysis.
1D Click Add tolerance.
Configure the Tolerance dialog as shown in the following figure.
Figure 3-15 Tolerance parameters for cc1.
Click Accept to return to the main Monte Carlo Analysis dialog.
(Click Add tolerance again, and repeat the above step but select ce2
this time.
The Model tolerance list tab must show the two models ce and
ce2.
© Wationalnstumans Corporation a Nain Laboratory Workbook(Click the Analysis parameters tab.
(Set the analysis to run an AC Analysis, with 5 runs, and set the
Output variable to V(output).
(Click Edit Analysis to configure the settings for the AC Analysis.
2 Configure the AC Analysis dialog as shown in the following figure.
Figure 3-16 Edit Analysis dialog for the AC Analysis.
Click OK to return to the main Monte Carlo Analysis dialog.
21. Run the Monte Carlo Analysis.
CO Click Simulate.
(1 The results should be similar as shown in the following figure.
‘© Nationa instruments Copraion 42 pw comntsFourier Analysis
17. Prepare the circuit for a Fourier Analysis
a
a
Open the instrument panel of the Funetion Generator and change
the waveform type to a Square Wave
You can close the instrument panel if you wish to have less number
of windows open.
18. Set up a Fourier Analysis
o
Select Simulate » Analyses » Fourier Analysis. Or click the arrow
‘on the Grapher/Analysis List bution on the Main toolbar and select
Fourier Analysis.
Click both Estimate buttons on the Analysis Parameters tab; this
will set the sampling options and ‘Transient Analysis options,
automatically
Select the Output tab.
Add V(input) and V(output) to the Selected variables for analysis
box.
time to the analysis lst.
19, Run the Fourier Analysis.
o
a
© Natonat etumens Corporation
Click Simulate,
Notice that the Grapher presents the results in two separate pages,
one for each variable. The results for W(input) and V(output) should
look similar to the following figures.
39 tse Laboratory WortbookFourier Analysis
200.
Du
v
-250.00m
0 100K 200 300k 00k
Frequency (Hz)
Figure 3-13 Fourier Analysis results for V(input)..
Fourier Analysis
oot
© 750m
500m
£ 200
So
> 250m}
0 100k 200k 200k 00K
‘Frequency (Hz)
Figure 3-14 Fourier Analysis results for V(output).
(tonal ebumensCopaaton
40 pwn comimatisin10,0000:
35553
3332.
10.0000.
16.6667
“B3333.
30,0000
10.0000
100.0000
frequency
200 0000-
100:0000-
100.0000 i
-200,0000:
ro.0000% 100.0000%
Phase (deg)
Run Log Descriptions
ren ened T cub vale
un (Mean Freep 2.20822 (sane as nominal, Higher than me
2.14266 (2.79247% lower than nominal, wer than mean E
ae
'2a164 (2587 Her than rail Fa hn mea
i
Figure 3-17 Monte Carlo Analysis results.
Note Please note that the X and Y axis scale was modified in the Axis Properties to better
show the differences. The original result is sampled from 1 KHz to | MHz.
(© Nationa! InametsCograon 43 ‘tise abeatry Workbookabe
(© Nationa instumentsCopraon
22. Finishing the exercise.
(2 Close any open instrument panel.
Close the Grapher,
(0. Save your exercise with the other circuit files you have been working
with.
1 Exit Multisim, Select File » E3
End of Lab 3
44 tp:sivaw comntsLab 4: Working with Results
In this exercise you will capture and post process multiple output signals and
export data to an external application.
Goal
1. Post process data generated from a Transient Analysis.
2. Export analysis results.
Reference Circuit Files
‘The following files are referenced in this exercise. They are located in the
C:\Exercises\Multisim\Lab04 folder:
© 40kFILTERS
+ 40KFILTER4 complete
Implementation
1. Open Multisim
2. Load circuit file
(ea Open circuit file 40kF TLTERA located in the
C:\Exercises\Multisim\Lab04 folder.
3. Review circuit file
fad O_ Verify that the Function Generator is configured for a Sine Wave,
40 KHz, 1 Vp.
a
Note that Rload is no longer present in the circuit since it was only
needed for Lab 3.
(2 Note that the Oseilloscope and the Bode Plotter have already been
removed
‘© Nateral nstaments Corporation 45 Mtn Laboratory Workbookssp
Figure 4-1 Initial circuit.
4, Prepare the circuit file for the exercise,
1 Select Options » Sheet Properties. In the Net Names section select
Show All click OK to finish.
O Double-click the net that connects R1, C1, C2 and R3. Change the
net name to FB1. Click OK.
Double-click the net that connects C1, R2 and the negative (-) input
terminal of the Opamp. Change the net name to F152. Click OK.
©
Fe 270pF
PF ge
1910
rm cs
wn Fez
ao2kn | a70pF
Figure 4-2 Net name changes.
Tip To lock the position of a net name, move it to the new location, then double-click only
the net name label and click Yes in the dialog,
‘© Nona Instuets Corporation 46 pve iconsMaking Pre
Measurements
5. Set up a Transient Analysis to measure the current through RI.
(Select Simulate » Analyses » Transient Analysis. Or click the
arrow on the Grapher/Analysis List button on the Main toolbar and
select Transient Analysis.
1 Select the Output tab.
1 Click Add device/model parameter; configure the dialog as shown
in the following figure.
Figure 4-3 Adding the current through Rt.
C1 Click OK.
The new I(rifi}) variable appears in the Variables in circuit box.
1D. Click the drop-down list under the Variables in cireuit label and
select All variables, this will display all the variables including the
last one created.
G__ Use the and/or keys to select I(rIfi), V(fb1),
‘V(input) and V(output), click the Add button to add them to the
Selected variables for analysis box.
6. Simulate the analysis,
‘National nsruments Corporation
0 Click Simulate.
47 tsi Ltoratory WorkbookLa yBnomp yuan
Figure 4-7 Analysis results.
Baal
1 Close the Grapher.
Now that you have completed an analysis you can perform post processing
‘operations.
Post-processing
8. Use the Postprocessor to add two voltages together.
1 Select Simulate » Postprocessor, or click the Postprocessor button
fon the Main toolbar.
1 On the Select simulation results box, selec the last Transient
Analysis (tran) result.
Note
For every analysis you have performed since you open Multisim you will see a result
displayed on this box. You may need to expand each branch (click +) to see the results.
© NaonalInunatsCorporton 50 ‘hpi comntsNotice how the list of Variables is now populated with the variables
used on that analysis.
9, Enter the expression,
Click Add to enter a new expression.
Q__ Enter the expression V(£b1) +V (output) to add the voltages of
the feedback node 1 (FBI) and the output node (output).
Q Te Doube-ctick the variable name andor the operator o inert it into the expression line.
>"* 4OKFILTERS_complete
Figure 4-8 Entering an expression in the Postprocessor.
(© Nationa instruments Corporation st MMs Labortry Workbook10. Create a Page and a Graph to view the expression result on.
(3. Select the Graph tab.
(1. Click Add to the right of the Pages box. Type Total Voltage in
the Name field.
[1 With the Total Voltage page still highlighted, click Add to the right
of the Diagrams box. Type Total Voltage ~ Graph in the
‘Name field.
11. Assign the equation to the Graph and Page.
With the Total Voltage - Graph highlighted, select the equation
from Expressions available box.
(1. Click > to move the expression to the Expression selected box.
Figure 4-9 Creating a Page, a Graph and assigning the expression.
(© National InstunentsCoporson 82 ap:hownnicomiatisn12. Calculate the expression,
Click Caleulate.
1D The result should look as in the following figure.
Total Voltage - Graph
20000
1.0000
5
Boo
s
1.0000
-20000 +
0 250.0000, 500.0000 720.0000 10000m
Time (S)
Figure 4-10 Result from adding two voltages.
Calculate the power dissipated by resistor R1.
13. Re-start the Postprocessor to calculate the power dissipated by RI
fe » Postprocessor, or click the Postprocessor button
toolbar.
[1 Repeat steps 8 to 12 to:
Create the expression: (V (input) -V(£b1))*1 (x1 (41)
Create a new Page called: Power Dissipation (W)
Create a new Graph called: Power Dissipated by R1
(J The resulting graph should look like the following figure.
‘Watt nsrman'sCrpraton 53 NM aaatisin Labora WerkPower Dissipated by R1
30.0000)
250000,
20.0000
150000,
10.0000,
Power (W)
5.0000,
50000
0 1250000 250.0000 375.0000,
00,0000:
Time (S)
Figure 4-10 Result from adding two voltages.
Note As you notice on the previous figure, the label of the Left Axis and the Bottom Axis
scale are different from your results. Modify the Graph Properties to match those of the graph
shown here to make your graph easier to read.
14, Close the exercise
(2 Close any open windows and the circuit file.
Leave Multisim open.
End of Lab 4
‘atonal Instruments Coporaton
54 pw icommtiinLab 5: Advanced Schematic Capture
In this exercise you will use advanced schematic capture options to edit the
Bandpass filter circuit. You will also document your work.
Goal
1, You will modify the Bandpass filter with graphic annotations and comments.
Create a Description Box for the filter.
‘Zoom to selected part with the Spreadsheet View.
Use the Spreadsheet View to edit component properties.
Establish constraint driven capture for Layout.
6. Bait the schematic Title Block.
Reference Circuit Files
‘The following files are referenced in this exercise. They are located in the
C:\Exercises\Multisim\Lab0S folder:
© 40KFILTERS
+ 40KFILTERS complete
© BandpassBehavior.bmp
Implementation
1. Open Multisim,
2. Load circuit file,
eB 1 Open circuit file 40kF TL-TERS located in the
C:\Exercises\Mult isim\Lab0S folder.
3. Review circuit file
(© National Insets Compaaon 55 MMi Laboratory WorkbookGraphic Annotations
4. Make the Graphic Annotation toolbar visible.
2 Select View » Toolbars » Grap!
Annotation,
fib SODeNA
Figure 5-1 Graphic Annotation toolbar.
DD Select View » Toolbars » Graphic Annotation.
5, Place Text
x 1 Click the Place Text button. Then click anywhere in a blank area on
the top left section of the workspace to start placing text
Cl Type: Bandpass Filter: Expected Behavior, and click
outside of the textbox to exit text editing mode.
Cl Right-click the entered text and select Font.
(1 Select Font Style: Bold, Font Size: 14. Click OK to apply the new
settings.
1D Move the text to the top-left comer of the workspace.
6. Place Bitmap.
(Click the Picture button,
(Select file BandpassBehavi or . bmp located in folder:
C:\Exercises\Mult isim\Lab05,
A ghost image attached to the mouse pointer will appear; place this
picture underneath the text you placed on step 5, click to place.
‘© Nabonalistuments Cporaon 56 ip: comtrtiinBandpass Filter: Expected Behavior
AC Analysis
ik 10k 100% iM
Frequency (Ez)
Figure 5-2 Text and bitmap placed on the top-left corner.
Comments
7. Place a comment on the workspace.
1 Select Place » Comment, or click the Place Comment on the
Graphic Annotation toolbar.
Click to place on the area above the filter circuit. Click somewhere
else in the workspace. Then hover the mouse above the comment
icon, see how the comment appears as a tooltip, this is the default
behavior of comments.
1 Double-click to edit the comment's properties.
In the Visibility section place a checkmark in Show popup window.
‘The comment text will now always be visible.
[1 Inthe textbox enter the following text: This is a 40KHz
bandpass filter. Click OK.
(Water nsrumentsCorperaton 57 Matin Lateraory Workbook(© National Instunents Corporation
‘Youetcemame 67D!
‘he De Dandpaes tne
@
Figure 5-3 Edited comment.
Controlling the Drawing Layers
8, To control the visibility of drawing layers
1D Select the Visibility tab of the Design Toolbox. If the Design
‘Toolbox is not visible you can bring it up if you select View »
Design Toolbox, or click the Show or hide design toolbox button of
the Main toolbar.
(1 Inthe Fixed Annotations section you can check and uncheck
Comment and Text/Graphies to toggle their display.
Figure 5-4 Visibility tab of the Design Toolbox.
1D Check Comment and Text/Graphics to make them visible.
58 pew comnts9. Change the layer assigned to a graphic.
o
Right-click the picture you placed and select Assign to Layer »
‘Comment, When you turn off the display of the Comment layer in
the Design Toolbox, the picture will no longer be visible.
Title Blocks
10. Place a Title Block.
o
o
Select Place » Title Block.
Select default.th7 and click Open. Place it anywhere in the
‘workspace, click to place.
Right-click the Title Block and select Move to » Bottom Right.
‘You may need to move around parts of your circuit to make space
for the Title Block. A sample diagram is shown in the following
figure.
— r SES T —H
Figure 5-5 Sample diagram after placing the Title Block.
(© Nationa nsramen’s Corporation
59 ‘Muti Laberatory Workbook11, Enter Title Block information.
1 Double-click the Title Block. Enter any information you wish, try
typing a Description and your Initi
1 Click OK to apply changes. Review the Title Block.
12, Edit the Title Block.
11. Right-click the Title Block and select Edit Symbol/Title Block. The
Title Block Editor opens.
C1 Click the Place Text icon on the toolbar and type Training: on
the Enter Text field, click OK to exit.
13 The text ghost image is attached to the cursor, place it in the empty
space at the bottom-right edge of the Title Block, click to place.
(Select Fields » Custom Field 1. Change the font size to 8 and click
OK. Place the attribute to the right of the word Training,
(2 The Title Block should appear as shown in the following figure.
ect onice Workbench a
‘Totoro ON MEW 2 INSTRUMENTS:
(ato a see prebnenersbanery
[ritie: TITLE? Desc: PT
[Designed by: #DESIGNED! ‘Document No: #O0CIN Revision: AREY
[Checked by: CHECKED! Date: #DATE ‘Size ENTE
Approved by. #ARPROWED! ‘Sheet #SNot #TSAl Training: HUSTON
‘Matera InseumentsCopraton
Figure 5-6 Title Block Editor preview.
1D. Select File » Save and
» Exit,
(1 Back in the workspace, double-click the Title Block and enter
Multisim Basics in Custom Field 1
1 Click OK. The Title Block should now look as shown in the
following figure.
60 pv nicomimatisinEectronics Workbench RATIONAL
strritpeter sect ¥
Toronto, OM MSV 2H1 INSTRUMENTS"
(ana 3550 urns wemecren
Tie: uPLTERS compte [esc Lab 5 Advanced Schone Copire
loesinediy. _nSe Docinert No. ooo Revision 10
lGmctedt nS Date 2007-08-04 ar
lAprovedby NSO Steet 1 oft Training ation Boss
Figure 5-7 Title Block.
The Spreadsheet View
‘The Spreadsheet View is a tool that displays information about the circuit, It
provides a way to quickly view and change the properties of components and
nets, export
your design,
circuit information to other software programs and find elements in
13. Open the Spreadsheet View.
a
If the Spreadsheet View is not open, select View » Spreadsheet
View, or click the Show or Hide Spreadsheet Bar button on the
Main toolbsar.
‘The Spreadsheet View is usually located at the bottom of the
Multisim application window; you can resize and move the
‘Spreadsheet View as you want. There are four tabs in the
Spreadsheet View: Results, Nets, Components and PCB Layers.
14. The Components Tab.
a
(Watona stumentsCopraton
Select the Components tab, this tab displays all components placed
in the circuit.
Locate the Opamp; look on the RefDes column for U1 and highlight
it.
Click on the Find and Select the Component button on the
Spreadsheet View toolbar (binoculars icon).
61 Mats Labrstory Workbook(1 Multisim zooms in, finds, and selects the component in the
workspace.
v2
IF
15V
Ie |
SS |
TC ussen | |
Lf ow
L__4y},- +
15V
Figure 5-8 Find and select U1
15. Customize the columns.
Right-click the column header Manufacturer and select Hide. The
column is now hidden,
1 Right-click any column header and select Show Columns. Place a
checkmark on Manufacturer and click OK. The column is now
visible again.
Q Tip Hide the columns that you do not use often,
(1 Click and hold the Footprint column header, drag it to the left side
of the Manufacturer column, This will re-order the columns in the
Spreadsheet View.
YS
‘anu yrodomt ‘Fecrpint | [ Manufacturer
Generic \°S/ un por UN POT Generic
C2210... | RESYSO0-7.. RESI200°70.._ 1PC-2221A...
a Seo me
C7351 Chip-CO603 C7351 Chp-cO603 Chip-Coe03"1PC-7351
C7351 Chip-Co603 C7351 Chp-Coéos Chip-Cosas—1PC-7351
Figure 5-9 Moving columns.
(© Watona Instruments Corporation 62 tpt commis16. Sort components.
Click the RefDes column header; this will select all rows underneath.
ey Click the Sort Descending button on the Spreadsheet View toolbar.
‘This is a useful tool to organize components in the Spreadsheet
View in alphabetical order.
17. Change the Footprint of the resistors.
Holding down the key, click the row of resistors RI and R2
in order to highlight them.
[Click (on any of the highlighted resistors) the cell under the
Footprint column, the Edit Footprint dialog opens.
1 Click Select From Database. This will display the list of all
available footprints in the Master database.
1D Select footprint RESO.S (No. 3056) and click Select.
1D Click OK to exit the dialog. The footprints are now RES0.5 type.
18. Export data from the Spreadsheet View. Please note that this feature is not
available in the Education Edition,
(Right-click inside the Spreadsheet View and select Select All
(J Click the Export to Excel button on the Spreadsheet View toolbar.
If Microsoft Excel® is installed on your PC, Excel will open and
populate with all the information that was selected on the
Spreadsheet View.
Bote temic ect isot avail, ou cn ao ego tet ke oa omme
separated value file (CSV).
(© National nseumentsCopraon 63. ‘MMs Lateratory Workbook19, Set Layout constraints for PCB Transfer.
Layout constraints can easily be set through the Spreadsheet View. This
information will be transferred automatically to NI Ultiboard when exporting,
and can be used to establish design limitations such as maximum and minimum.
trace widths of all nets
11. Select the Nets tab on the Spreadsheet View.
(J Any net using either power or ground will have a trace width of 15
mils, and all others will be 10 mils. Click the Trace Width Min
column header, this will select all rows.
1D. Click any cell under that column, Type 10 and press .
Click anywhere else in the workspace to quit this mode,
Figure 5-10 Entering Trace Width Min information.
1 Allnets now have 10 mils as minimum trace width, Using the
key, select PoslS, Negi5 and 0 which are the power and
ground nets
(Enter 15 under the Trace Width Min column for the selected nets
‘and then press . Only the power and ground nets should
now have 15 mils minimum trace width, all others have 10 mils.
20. Close all files.
2 Close all files and leave Multisim open.
End of Lab 5
atonal Istuments Cogreon 64 spate cominLab 6: Communication and Transfer
This exercise provides an introduction to the Reports available in Multisim. You
will also learn how to transfer your design to PCB layout software such as NI
Ultiboard
Goal
1. Generate a Bill of Mat
ials (BOM),
2. Learn how to customize the BOM.
3. Learn about transferring a design to PCB layout.
Reference Circuit Files
The following files are referenced in this exercise. They are located in the
C:\Exercises\Multisim\Lab06 folder:
© 40kFILTER6
+ 40KFILTER6_complete
Implementation
1, Open Multisim,
Load circuit file
Z| Open circuit file 40kF TLTERG located in the
C:\Exercises\Multisim\Lab06 folder.
(© Nata Instruments Corporation 65. Makan Laboratory WorkbookBill of Materials (BOM)
3. Generate a Bill of Materials (BOM).
O Select Report » Bill of Materials.
4. Customize the BOM.
(Click and hold, then drag any column header to move that column to
a new location,
1 Click any column header to sort the BOM by that column,
@ (1. Click the Select Columns button on the toolbar. Check/uncheck
different columns to show/hide them.
& 11 Click the Show Real Components button to go back to the original
@ (C1 Click the Show Virtual Components button to display all virtual
components in the circuit.
8&8 Note None of the virtual components will export to PCB Layout.
Review the other button on the BOM toolbar, you can save a text file
of the BOM, print the BOM, see a print preview and export to
Microsoft Excel®. Close the BOM when you are done.
(CAPACITOR, 270pF
[POTENTIONETER, 1
|RESISTOR, 40.280
Figure 6-1 Bill of Materials (BOM).
(Nate nsroments Coperaton 66 tptewnnicomimutiinTransfer to PCB Layout
5. Prepare your design for transfer to PCB Layout.
FR} ote tr you had virtual resistors, capacitors or any other component without a footprint
assigned to it, this will be the time to assign one. In Lab 5 you learn how to change the footprint
of the circuit components using the Spreadsheet View. You can also replace a component if you
right-click the component and select Replace Components.
Place a header connector for the battery supply and input and output
signals. Select Place » Component, locate HDRIXS in the Master
database, Basic group, Connectors family.
1 Connect the header as shown in the following figure.
a
I
xeon 270pF
fasreriaa —wn—4
ee 191k
¢
TPF Rt a
1
40.2k0 20 v2
iif
% |
15V
10 I
50%
hia ial
~ [, LMasen
at va
Posts [ {it
Ground 1
Negt5 +
Input
Output
HDRAXS
Figure 6-2 Completed schematic for transferring to Layout.
‘Walon nstuments Corporation 67 Nats Labratry Workbook6. Return to BOM to see the changes.
1D Generate a new BOM report. The header is now added to the list
1 Close the BOM report.
7. Design is ready, transfer the design to NI Ultiboard,
(I. Select Transfer » Transfer to Ultiboard 10,
(1. Save the design’s netlist file (.ewnet) in the default directory,
[NI Ultiboard opens, click OK to accept the default trace width and
clearance.
1D Click OK to accept the actions to be forward annotated.
(D_Ultiboard shows the PCB layout workspace with a default board
outline and the components unplaced and not routed,
8, Close Ultiboard,
1. Select File » Exit to close Ultiboard. Select Yes if asked to save the
changes.
sae Learning Ultiboard is beyond the scope of this course. The N/ Ultiboard: PCB Layout
course teaches you how to design and finish a PCB project.
Additional Exel
1. Examine some of the other reports from the Reports menu,
2. Close all files and leave Multisim open.
End of Lab 6
(© Nana! inuentsCrparation 68. ip: contiLab 7: Working with Projects and Design Sharing
‘This exercise will provide an introduction to working with Projects and Team
Design in Multisim, Subcircuits and Hierarchical Blocks will be contrasted. You
will also review Electrical Rules Check in a design and Project Management.
Goal
1. Use design blocks, Hierarchical Blocks (HB) and Subcircuits (SC).
Use Bus Vector Connect.
Find components within a design.
Use Electrical Rules Check (ERC).
Use Project management.
Reference Circuit Files
‘The following files are referenced in this exercise. They are located in the
C:\Exercises\Multisim\Lab07 folder:
© 40KFILTER7
© 40KFILTER7_complete
© display_driver
© display_logic
+ gain_stage
© sonar_control
© sonar_design!
‘© sonar_design!_complete
Implementation
1. Open Multisim,
«© National nstuments Corporation 69. atin Laboratory WorkbookDesign Blocks (HB and SC)
Hierarchical Blocks and Subcircuits are tools to improve the overall design
structure of circuits. Both can be used as building blocks to assemble a circuit. A
Hierarchical Block is a design block that is stored in a separate file from the
parent circuit file, whereas a Subcircuit is stored in the parent file.
2. Load circuit file.
SI OD Open circuit file sonar_design1 located in the
iE C:\Exercises\Multisim\Lab07 folder. This is the skeletal
design of a sonar circuit.
it requires a Bandpass filter with a gain stage for receiving
(1 Select Place » Hierarchical Block from File, or click the Place
Hierarchical Block button on the Components toolbar.
(J. Select the gain_stage file located in the
C:\Exercises\Multisim\Lab07 folder.
(J Click to place this block on the workspace underneath the
Oscilloscope.
FJ Note inpuvOuput (WO) pins provide an interface to higher level files for HBs and SCs. In this
case, gain_stage is already configured with VO pins to be a HB.
received signal
x2
‘gain stage
Figure 7-1 Place gain_stage underneath the Oscilloscope.
(© Nationa stamens Carraon
70 patio nicommtisin4, Load circuit fie.
S| _ Select File » Open, or click the Open File button on the Standard
toolbar.
Cl Open circuit file 40kF ILTER7 located in the
C:\Exercises\Multisim\Lab07 folder.
5. Modify the Bandpass filter so that it can be used as a HB.
= (J Select Place » Connectors » HB/SC Connector.
(1 Click to place this VO pin to the left of the Bandpass filter.
[Double-click the pin and change the RefDes to £i1ter_in.
Acknowledge the message that pops:
O_ Repeat the above step and place another connector as an outpat pin,
before placing this pin on the workspace you can rotate it 180° by
pressing twice. Click to place this pin to the right of the
Bandpass filter and name it £11ter_out. Acknowledge the
‘message that pops-up.
Connect the input pin to the input ofthe filter and the output pin to
the output of the filter as shown in the following figure.
TOF
gitersn Rt
woz
vase
i|+-—
18v
Figure 7-2 Place /O HB/SC connectors to the Bandpass filter.
Walon nstomens Corton n Mts Latoatry WorkbookC1. Select File » Close and Save when prompted. The Bandpass filter is
now ready to be used as a HB.
6. Back in the top-level design, place the Bandpass filter as a HB.
(Select Place » Hierarchical Block from File, or click the Place
Hierarchical Block button on the Components toolbar.
Fa
(Select the 40kF TLTERT file you just modified,
(0. Click to place the block before the gain_stage block and wire them
up as shown in the following figure.
reseived signal
“
aK
osv
Figure 7-3 40kFILTER7 and gain_stage HBs.
@ Tp tr when you place a HB, you see the footprint pins displayed as shown in the following
figure, you can tum them off if you double-click the symbol, then select the Display tab, uncheck
Use Schematic Global Setting and uncheck Show Footprint Pin Names, click OK to exit
xa xa
AUER TB in liver oo [AOE ow [ite Given
> 8 Show Footprint
Pin Names.
‘40XEILTER? 40KPILTER?
Figure 7-4 Show Footprint Pin Names property.
‘© Natoral instruments Coporaton 72 ip:tewuicomimatisinHBs and SCs can also be created easily by selecting a part of an existing circuit
and replacing it with a HB or SC. You will divide the sonar circuit into
appropriate stages to improve design flow and legibility
7. Convert the 40 KHz. Signal Generator section into a Subcircuit (SC).
Select all the components of the input stage at the top left section of,
the circuit; this is a 40 KHz Signal Generator and is outlined by a
dashed rectangular box.
I over sional Gener
Figure 7-5 Input stage selected.
G__ Right-click any of the selected components of the input stage and
select Replace by Subcircuit.
Inthe prompt dialog type Signa1_Gen as the Subcircuit name.
Click OK to continue.
(Click to place the Subcircuit in the same spot the components were
before. Multisim re-wires the circuit automatically.
(© Nana! Instruments Caeraon 73 Nahas Lateran Workbookxa 40KHz
tx_out
Signal_Gen
tx control
Figure 7-6 New Subcircuit re-wired.
1D. Select File » Save, or click the Save File button on the Standard
toolbar.
Hierarchical Block (HB) Design and Bus Vector Connect
8, Place another HB called display_logic.
(1. Select Place » Hierarchical Block from File, or click the Place
Hierarchical Block button on the Components toolbar.
C1 Select the file display_logic
1D Click to place the HB to the left and underneath the 7-segment
Displays
vec vee
ov ev
Ivee Wwee
us us
Figure 7-7 Place display_logic.
© Nationa istunents Corporation 74 pte camiDesign blocks are easy to duplicate.
9. Check nested blocks.
G_ Double-click the display_logie block and click Edit HB/SC to open
the design block in a new circuit tab,
| Notice how blocks can be nested and that there are two instances of
the same HB display_driver.
sonar_designt complete
EB soner_desiont complete |)» Top-tovel circuit
4* child hierarchy
} 2% child hierarchy
(nested)
igure 7-8 Hierarchy design
Double-click the display_driver block and click Edit HB/SC to
tunnel further down to see the lowest level block
Click sonar_design1 in the Design Toolbox to return to the top-
level view of the circuit,
10. Connect vietwal wires,
Inthe top-level circuit, locate the display_logic block.
(Click the enable pin to draw a net to the left of this block, and
double-click on the workspace to finish wiring (this is an example of
‘mid-air wiring)
(atonal insbuments Corporation 15 ‘MMs Laborato Workbook(0 Double-click this net and rename it to enable_count. You will be
prompted to virtually connect nets, click Yes (this is an example of
virtual wiring).
Repeat the previous two steps on the pulse pin, naming the net
new_pulse.
enable_count x5
enable
ati” sac_ovr
new_pulse
;_our
display logic
Figure 7-9 Mid-air and virtual wiring.
11. Connect a Bus.
To automatically draw a bus, click the SEG_OUT bus pin to create a
bbus wire to the right of the display_logic block and after the
rightmost 7-segment display, double-click to finish the bus wire.
2. The two 7-segment displays should now have the bus wire located
underneath,
ip To place a bus without connecting it to a bus pin, select Place » Bus, or click the Place
Bus button on the Components toolbar.
7]
C1. Select the leftmost 7-segment display. Once it is highlighted select
Place » Bus Vector Connect or right-click the display and select
Bus Vector Connect
The left side of this dialog contains pins that will be used from the
component. Select which side of the component to connect, in this
case the default selection of Bottom is appropriate.
{National Instruments Corporation 76 pte. comtatisen1 Select pins A to G by selecting A, press and hold the key
and select G.
1 Click ¥ to transfer the selection to the table below.
D_ Select BUSI on the Bus section to display all bus
inherited from the block.
Select DAO to DAG and click ¥ to transfer those bustines to the bus-
mapping table below.
Figure 7-10 Bus Vector Connect dialog.
Since the order of assignment is correct for this example (no need to
use the Up or Down buttons) you can click OK and the component
will auto-wire all pins to the bus.
(© Nationa Isturents Corporation 7 ‘kasi Laboratory Workbookdisplay_logic
Figure 7-11 7-segment display and Bust are now connected.
[Repeat for the 7-segment display on the right, this time mapping to
buslines DBO to DB6.
[Select File » Save, or click the Save File button on the Standard
toolbar.
Finding Components
12, Find a component in the schematic.
(1. Select Edit » Find to display the Find Component dialog.
(3 Configure the dialog as shown in the following
National tumors Crporaton 78 pow n.comintsnFigure 7-12 Find Component dialog.
Two instances should be found and displayed in the Results tab of
the Spreadsheet View. Double-click one of the instances and
‘Multisim will take you to location of the component.
Figure 7-13 Component located.
design] in the Design Toolbox to return to the top-
National nstuments Corporation 79 i ais ateraory WorkElectrical Rules Check (ERC)
13, Run the ERC tool.
a C1 Select Tools » Electrical Rules Check, or click the Electrical Rules
Checking button in the Main toolbar.
(The Electrical Rules Check dialog allows you to specify the scope
of the ERC to be performed. Click OK to run an ERC on the current
page of your design.
14, Review ERC results.
(1 Check the Results tab of the Spreadsheet View. Multiple errors
should be listed saying that a Bidirectional to Power connection is in
place.
1D Double-click on any of the errors and Multisim will take you to the
location where the error is. Notice how a red circle signals the
location of the error.
15, Modify ERC parameters,
a (1 Return to the Electrical Rules Check dialog.
Select the ERC Rules tab.
‘The ERC Rules tab establishes a matrix where you can specify what
should be flagged as error or warning or not flagged at all.
1 You will allow Power pins to connect to Bidirectional pins. Click
multiple times the square where PWR meets BI until the square is
teen.
(© Nationa istunents Corporation 80 teu nicomimtiinFigure 7-14 ERC Rules tab.
1D Click Apply and OK to run the ERC and note the new results in the
Spreadsheet View (no errors).
16, Clear ERC Markers. Please note that this feature is not available in the
Education Edition.
G__Return to the Electrical Rules Check dialog.
[3 Change the Seope to Whole Design and click OK.
Note that now every ERC error or warning in the design is being
flagged.
2 Nationa seamen Corporation at Nati Laboratory Workbooka Select Tools » Clear ERC Markers to clear the circuit of errors.
(Select Whole Design and click OK.
Project Management
17, Start with a new workspace.
B 1D Select File » Save and File » Close
18. Create a new Project.
1. Select File » New Project. Configure the dialog as shown in the
following figure.
Figure 7-15 Creating a new Project.
TJ Note You can also change the default path forthe Project and Version folders. Keep the
defaults for this exercise.
National stunts Corporation 82 bpatewe.cmimatisin© Nationa instumen's Coporaton
19. Review the Project View tab.
The Project View tab of the Design Toolbox displays the files used
in the Project. Select View » Design Toolbox if it is closed or click
the Show or hide design toolbox button on the Main toolbar.
Right-click the Schematic folder and select Add file.
Add the following files to your Project. Press the key to
select multiple files.
40KFILTERT_complete
display_driver
display_logic
gain_stage
sonar_control
sonar_design!_complete
[besten toobox a]
‘Schematic
& 4Obfiter7_compete.st0
& siplay_dtiver.s10
& dsplay_logi.nst0
@ oan stage.msi0
@ sonar_controlnstO
-&& sonat_desiqnt_complete.me10)
Figure 7-16 The Project View.
83 tien Labratory Weribook1 Double-click sonar_design1_complete to open the circuit file.
20. Save and Close the current Project.
1. Select File » Save Project.
Select File » Close Project.
21. Close all files,
1D Select File » Close AM,
(D_ Leave Multisim open,
End of Lab 7
(© National nsments Corporation 84 hapten nicomasinLab 8: Working with Design Variants
This exercise will provide a general introduction to working with Design
Variants in Multisim. You will cover variants in flat designs as well as variants in
a hierarchical design.
Please note that Design Variants are not included in the Education Edition.
Goal
1. Add design variants to the sonar circuit created in Lab 7
2. Set up Variant Mappings for a hierarchical design.
Reference Circuit Files
‘The following files are referenced in this exercise. They are located in the
C:\Exercises\Multisim\Lab08\Lab08a folder:
© 40KFILTERS
© display_driver
© display_logic
© gain_stage
© sonar_control
* sonar_design2
© sonar_design2_complete
Implementation
1. Open Multisim,
Load circuit file,
| 1 Open circuit file sonar_design? located in the
C:\Exercises\Mult isim\Lab08\Lab08a folder.
3. Review the circuit file.
D_ Review the circuit file; this is the project that you worked with in
Lab].
‘Water nsraments Corporation 85 Ati ater WorkbookAdding Design Variants
4. Place new components.
2 Place the following three components in the dashed box at the top
left section of the sonar_design2 page.
Group Family ‘Component Value
TIL 74s1D_ 7408N Any section
Sources | Signal_Voltage Sources | CLOCK_VOLTAGE | 40kHz, SV
Sources | Power_Sources GROUND
5. Wire the components.
Add wires to match the diagram in the following figure. Be sure to
rename the nets so they are virtually connected to the rest of the
circuit
xa 40KHz
‘out
Signal_Gen
tx control
tx control
Figure 8-1 Virlual wiring of the new components.
(© National Instuents Corporation 86 hapiwuw icons6. Use the Variant Manager to modify the circuit’s Variant information.
1 Select Tools » Variant Manager,
Select sonar_design2.
1 Click Add Variant to add a new variant named VirtualClock.
(J. Select variant Defaultl and click Rename Variant, rename it to
RealClock
Figure 8-2 The Variant Manager.
Click Close to exit the Variant Manager and return to the top-level
circuit workspace.
G_ The Design Toolbox should now look like the following figure.
Notice how a new folder called Variants was added to the hierarchy.
(Natorl numer Corporation a7 ‘MMi Lateratory Werk1 somar_design2_complete
= Variants
i Realclock
1D virtuslclock
‘sonat_controkX1)
{BIR gain_stoae(x2)
15188) Signal_Gen(xa)
GA Variants
} RealClock
Witualcock
Bal display_logic(xs)
display_driver(x1)
i dpiay driver)
if) 40KFILTERS(x3)
Figure 8-3 The Design Toolbox with Variant information.
7. Modify the Variant information on the Signal_Gen SC.
1 Goto the top-level design page.
1 Double-click the Signal_Gen block to open up its properties.
Select the Variant tab.
B__Change the mappings so that a Parent Variant of RealClock maps
toa Child Variant of RealClock, Double-click the Child Variant
cell to change it.
(Change the mappings so that a Parent Variant of VirtualClock
maps to a Child Variant of Exeluded. This means that the entire
block will be excluded when the VirtualClock variant is active.
(J. The Variant tab should look like the following figure. Click OK to
exit this dialog.
{National nsrumontsCopraton 88 tte ncommatsinFigure 8-4 Variant tab properties of Signal_Gen.
8. Modify the Variant information on the 7408N.
© Double-click the 7408N AND Gate you added previously.
Select the Variant tab and change the mappings so that the
component is Excluded for a RealClock active variant, and
Included when the VirtualCloek variant is a
9. Modify the Variant information on the Clock Source.
D__ Repeat step 8 for the 40 KHz clock source component you added
previously.
10. Review the circuit,
The 40 KHz clock source component and the 7408N AND gate are
now grayed-out, This is because the current active variant is
RealClock. It should look like the following figure.
(© Watoa instruments Copraton 89 IM Matin Lateran Workbooktx out
tx control
Figure 8-5 The virtual clock source and the AND
gate are disabled in a RealClock active variant.
11, Change the Active Variant.
(D Select Tools » Set Active Variant.
1D. Select VirtualClock from the list and click OK,
(2 The Signal_Gen block should now be grayed-out and the virtual
clock source and the AND gate should now be enabled.
You can also set the Active Variant from the Design Toolbox. Expand the Variants
folder at the top of the Hierarchy view and double-click the empty square next to the Variant
name, this will set that variant to be Active. The Variant with the blue-filled square is the Active
Variant
BD sonar desicne
= GB Variants
=o
1 vrtuattock
cB sonar. desonz
Figure 8-6 Set the Active Variant from the Design Toolbox.
National Instruments Corporation 90 pawn nicomtmatsnNote
Whichever section of a circuit is not active, that means not present in the Active Variant,
will be colored gray and will not be present for simulation, export to PCB Layout programs or
‘when reports are generated.
Note At this point, simulation is not recommended. You first need to set the Variant Mapping
information on the rest of the circuit blocks so that they understand which variant they should
work with,
12, Close all files.
Reference Circuit Files
Close all open files.
Leave Muttisim open.
‘The following files are referenced in the next section of this exercise. They are
located in the C
(Water nsuments Corton
Exercises\Mult isim\Lab08\Lab08b folder:
40KFILTERSD
display_driver2
display_logic
gain_stage2
sonar_control2
sonar_design2b
sonar_design2_complete
40KFILTERSb_complete
display_driver2_complete
display_logic2_ complete
gain_stage?_complete
sonar_control2_complete
a Misi Labora WorkbookVariants in a Hierarchical Design
13. Load cireuit file,
| Open circuit file sonar_design2b located in the
€:\Exercises\Multisim\Lab08\Lab08b folder.
14, Review the circuit file.
1D Observe the Design Toolbox and notice that this file has had more
variants added to it.
The variants added allow for designs with CMOS components with a real
clock (CMOS, RealClock), CMOS components with a virtual clock
(CMOS_VirtualClock) and TTL components (TTL).
Inside the Hierarchical Blocks there are only variants for CMOS and
TTL,
15, Review the circuit file.
1D. Observe the Design Toolbox and notice that this file has had more
variants added to it.
1D. Open the display_driver2 HB located inside display_logic2. Notice
that CMOS alternatives have been added inside the block so that the
circuit can use either TTL or CMOS chips.
© Return to main page of the design.
16. Modify variant mapping information for subcircuit Signal_Gen.
1D. Double-click the Signal_Gen block to open the properties dialog.
(Select the Variant tab,
Since this is a Subcircuit it has all the same variants as the root page.
Set up the mappings so that CMOS_RealClock maps to
CMOS _RealClock, TTL maps to TTL and CMOS_VirtualClock
maps to Exeluded.
(© Natoma Inseunents Corporation 92 new i cominatisinFigure 8-7 Variant Mapping table for Signal_Gen.
Click OK to exit this dialog and apply the changes.
17. Modify variant mapping information for the hierarchical blocks.
12__Repeat step 16 for each of the Hierarchical Blocks on the main page.
For each one, set the variant mapping so that CMOS__RealClock and
CMOS _VirtualClock both map to CMOS, and that TTL maps to
Figure 8-8 Variant Mapping for Hierarchical Blocks.
(© Nona nstumentsCopraton 93 ‘MMi Labratory Workbook18. Modify variant mapping information for the hierarchical blocks included
within display_logic2.
C1 Repeat step 16 for the two display_driver? HBs that are nested
inside the display_logic2 HB of the main page. For each one, set the
variant mapping so that CMOS maps to CMOS, and that TTL maps
toTTL.
Figure 8-9 Variant Mapping for the internal HBs of display_logic2.
(© Nationa struments Coeraion 94 ipnicomimtiin19. Experiment with the Variants,
‘The mappings are now set, so changing the Active Var
to the correct variant at every level of the circuit.
int will switch
} Switch the Active Variant to see the behavior of the main design.
C1 Set the Active Variant to TTL.
P J Simulate the circuit.
enable, count
Figure 8-10 Simulation of the circuit in TTL variant mode.
© National istuments Corporation 95 sin Laboratory Workbook20. Close the circuit.
Stop the simulation,
a (Save all your files.
D Close all files.
Leave Multisim open.
End of Lab 8
Nation Instruments Corporation 96 pe cantLab 9: Creating Components
Using the Component Wizard you will create a new Opamp by using the
manufacturer's SPICE model and footprint information.
Goal
1, Create the Linear® LT1078 Opamp using the Component Wizard.
2. Learn how to use the Symbol Editor.
Reference Circuit Files
The following files are referenced in this exercise. They are located in the
C:\Exercises\Multisim\Lab09 folder:
© Linear.ib
© LT1078 datasheet. pat
* L71078.1
+ PICLOF84A.par
© PICIOF84A.sym
stCireuit
Implementation
1. Open Multisim,
o (Make sure that a blank circuit page is in the workspace, otherwise
create a new workspace.
The Component Wizard
2. Locate the SPICE model for the component.
(1 Using Notepad® or any other word processing software open the file
Linear.lib located on the C: \Exercises\Multisim\Lab09
folder.
Select all the text in the file and copy the selection into memory
(Edit menu). Close the word processing tool
€ Nationa stuments Carporaton a7 atin Laboratory Workbook3. Start the Component Wizard.
In Maltisim, select Tools » Component Wizard, or click the Create
& ‘Component button on the Main toolbar.
4, Step 1: Enter component information,
J Configure the dialog as shown in the following figure. Since you
have access to the SPICE model you can create the component for
simulation,
Figure 9-1 Step1.
Click Next to continue.
(© Nationa nstunentsCoporaton 98 apstoww commas5. Step 2: Enter footprint information.
According to the datasheet, the footprint is a PDI
near Techno
eroTen 70m Dasher
OUTA
-INA
+INA
vr
NB PACKAGE
‘8-LEAD PDIP
ve
ouTB
-INB
+INB
Figure 9-2 Footprint information.
D_ Click Select a Footprint. Use the following figure to help you locate
the PDIP-8 footprint.
Dotalist
0 [niece
so Wewzainieet fowaqrome) 24H
sm weainnace pomeNsOTz) 8H
sn wewaneea fora ab
|leve weazanezze ropzaney 2 1
| Jasco rors.
asm wcaczibtice poms
[ste pezainee FORAIC ik H
ra
ed ee
pee Copyto |
8573839510311, OF
:637/9;9;10;11, OP
123545;6:7839;10;11, OF
12,8345;67;659; 10511, DIP
1259345367365; 10;11, OF
15233:455)6736)9 10311. OF
Figure 9-2 Selecting the PDIP-8 footprint.
© Naot Insumon's Crpraton 99
IM Ata Laboratory Workbook1D. Click Select to select the PDIP-8 footprint and return to the
Component Wizard dialog.
(1 This is going to be a multi-section component, configure the
component for 2 sections, 5 pins per section. The configured dialog
must look like the following figure.
Figure 9-4 Configuring the multi-section parameters.
Click Next to continue.
(© Nationa stunts Corton 100 patents6. Step 3: Enter symbol information.
Step 3 of the Component Wizard shows the symbol generated by
default. You can modify the symbol. For this example, you will copy a
symbol from the database.
Click Copy from DB. Locate the LM107J Opamp in the Master
database, Analog group, Opamp family.
0 Click OK,
(Notice how the symbol in section A is different from the one in
section B. Select the section A tab and click Copy to, check all
‘options and click OK.
Figure 9-5 Step 3.
Click Next to continue,
atonal nsmans Corporation 101 MMs Latratory Workbook7. Step 4: Set pin parameters.
Step 4 of the Component Wizard allows you to select the pin model
type for each pin in the symbol, and to select whether to include or
exclude that pin from Electrical Rules Check (ERC). You can also
configure common pins and hidden pins if any are present on your new
‘component.
(1 Configure the Type column as shown in the following figure.
Figure 9-6 Step 4.
(2 Click Next to continue.
(© Nationa insruments Corporation 102 np combo8. Step 5: Set mapping information symbol-footprint.
‘Step 5 of the Component Wizard provides you with the opportunity to
review the mapping between the symbol and footprint. It is needed when
‘you export to a layout package. Please ensure that the mapping is
‘accurate by comparing it to the datasheet information.
1 Map each symbol pin to its corresponding footprint pin. Use the
footprint schematic shown in figure 9-2. The configured dialog must
Jook like the following figure.
Figure 9-7 Step 5.
Click Next to continue.
(© National Inserts Copoatn 103 asin Laboratory Workbook9. Step 6: Select simulation model.
Step 6 of the Component Wizard requires you to enter the simulation
‘model information. You can load SPICE models or create one with the
‘Model Makers.
You will use the model you copy at the beginning of this exercise.
Right-click anywhere inside the Model Data box and select Paste.
(J Inthe Model Name field type LT1078.
Copy the model from section A to B. Click Copy to, place a
checkmark on the Section B option and click OK.
CONNECTIONS: + -V4¥-0
SUBCKTLTIO73 32746
Figure 9-8 Step 6.
(1 Click Next to continue.
© Nationa stunts Copraton 104 tp:wwnnicomintisin10. Step 7: Set mapping information symbol-model.
In Step 7 of the Component Wizard you must ensure that each symbol
pin associates to the corresponding number connecting to its node in the
‘model. From the text file of the SPICE model the following is known:
* CONNECTIONS: tov
-SUBCKT LT1078. «3.2746
After reviewing these two netlist lines, the following is true:
First node (1) is node 3 which is the non-inverting input (+)
‘Second node (2) is node 2 which is the inverting input (-)
Third node (3) is node 7 which is the positive supply (V+)
Fourth node (4) is node 4 which is the negative supply (V-)
Fifth node (5) is node 6 which is the output (O)
11 Using the previous information configure the Step 7 dialog as shown
in the following figure. Configure both sections A and B in the same
‘manner.
Figure 9-9 Step 7.
Click Next to continue.
Natenat stunts Capea 405 Matin Labrtry Workbook11. Step 8: Save the component to the User or the Corporate database.
(Expand the User Database.
(1. Select the Analog group.
(3 Click Add Family. Type opamp as the new Family Name and click
OK.
Figure 9-10 Step 8.
(1. Select the new Opamp family and click Finish.
(© Nationa Istuments Cagraton 108 ipo nicortisin12. Test the newly created component,
a DD Create anew file,
1 Select Tools » Circuit Wizards » Opamp Wizard.
O. Configure an Inverting Amplifier with a Gain of -2.
1D Click Verity,
1D Click Build Circuit when you are ready to continue.
1D Place the new circuit anywhere in the workspace.
1 Replace the virtual Opamp with the new component you created.
1D Place DC Power supplies for +12 and -12 Volts needed for the
Opamp.
SI 1 Place an Oscilloscope to plot the input and output voltages.
> Simulate, you should see a waveform as shown in the following the
figure.
Figure 9-11 Simulation results from the new component.
(© Nationa iste Ceperaton 107 asin Laboratory WorkbookFigure 9-12 Test circuit for the new component.
a (Stop the simulation.
ey Save your work and close the test file.
0 (Create a new blank workspace.
© atonal istuments Compaen
108 niga comntisinThe Symbol Editor
In this section you will create a new component and define the symbol for that
component. The example will create a microcontroller component (PICI6F84A).
You can find the datasheet in the C: \Exercises\Mult isim\Lab09 folder.
13. Create the component.
EY Start the Component Wizard.
(For the Component Name enter PTC16F84a, select Layout only
(footprint) and fill the Author and Function with any information
‘you consider useful. Click Next
G_ InStep 2, select footprint SO18 from the Master database (Hint:
#3364). This is a single section component with 18 pins. Click
Next.
Q_ Step 3 shows the symbol generated by default. You must modify this,
symbol to the desired shape. Click
14, Use the Symbol Editor to create an appropriate symbol for this component.
3 The Symbol Editor appears with a default symbol and shape.
18
17
16
15
14
13
4
joa
KEE
11 -~«
10
COVHUESWNE
Figure 9-13 Default symbol created by the Component Wizard.
2 NateralInseuments Corporation 409 asi aberatory Workbook1D. The Symbol Editor appears with a default symbol and shape.
ey (Start by resizing the boundary box. Select Edit » Resize Boundary
Box, or click the Resize Boundary Box in the Drawing toolbar.
Make the rectangle a lot bigger to fit all 18 pins and the pin names
you will be creating later. You can always resize the boundary box at
a later time if needed.
Tip All pins are bounded to the outside of the Boundary Box. Experiment with resizing it
whenever you need more space inside the symbol.
Tip The Spreadsheet View works very similar as in Multisim, use it to change object,
Properties.
1 The SOIC pinout of the component is located on Page 4 of the
PICIGF84A datasheet, the table is reproduced here for your
convenience.
Nonber Pin Name Neuter Pin Name
1 [Raz 10 | RBs
[2 [Ras i | RBs
3 | Raarockt 12 | RBG
4 [-McLR(AciveLow) | 13 | RB?
5 | Ves 16 | Voo
6 | RBOnNT 1s | oscucLKouT
7 [RBI 16 | oscvcLKour
3 | RB2 17 [RAO
9 | RBS 1s [RAL
© Nationa nsrunents Corporaton 110 pte. comtmasin(Inthe Spreadsheet View, select the Pins tab.
1D Rename each pin, click the name cell and type in the new name
according to the previous table.
(1. Inthe Spreadsheet View, locate ~MCLR and change the Shape of
the pin to a Dot Pin (to represent an active low pin).
uae [Shao
Raz tine Pn
nao tine Pn
RasjTocd > Une Fin
“HGR © Dot Fin
55 tine Fn
ReONINT Line Pn
et tine Pin
a2 tine Fn
63 eine Fi
64 eine Fin
es eine Fn
66 eine Fn
67 tine Fin
woo ine Fn
(sco}OM.OUT —* Line Fin
‘scifoaouT —* Line Fin
a0 Sethe Fn
RAL tine Fn
Figure 9-14 Completed Spreadsheet View.
1D Review the rest of the columns in the Spreadsheet View and the
Draw Layer tab to lear what other parameters you can change from
here
1D. Move the pins to match the symbol presented in the following figure.
Click the symbol lead, hold and drag to move.
‘© Nationa nstumentsCopraton 1 Nats Lateratory WorkbookPIC16F84A
yDD =MCLR Ox
BRO
RAL OSC1/CKLOUT: |-«
RAZ OSC2/CKLOUT. |-*«
RAZ
RA4/TOCKI
EEEET fT
RBO/INT
RB1
RB2
RB3
RB4
RB5
RBS
RBT vss Lx
TEELEETE
Figure 9-15 Completed symbol.
x C1 Select Graphies » Text or click the Place Text button on the Draw
‘Tools toolbar.
Cl Type PICIGF 4A and click OK.
Click to place the text in the top section of the rectangle.
1D Once you are done making changes to the symbol, select File » Save,
then File » Exit,
If the Multisim window does not automatically maximizes you can click
the Multisim bar inthe taskbar section,
Q Tip Fromthe Symbol Editor you can also save the symbol as file, Select ile» Save As,
this is useful when you want to share your symbols
(© Nationa stamens Cargoraton 412 htc comin15. Continue with the Component Wizard,
[Back in Step 3; copy the edited symbol to the DIN symbol set. Click
Next when ready to continue.
11 In Step 4 of the wizard set the type of ~MCLR to be an INPUT pin,
set VSS and VDD to be PWR pins and click Next to continue.
(InStep 5 accept the defaults. In this example, all of the pins are
correctly mapped. Click Next.
1 In Step 6, save the component to your User Database, under the
Mise Digital group create a new family named PICMi cro.
0 Click Finish,
16, Try the new component symbol.
1 Place the newly created symbol on the workspace. The green outline
color represents a component with no SPICE model
U1
PICIBFB4A
vop encun >
L
mo
BAL osciscKoun—
paz oscz/cKLouy—
Ba
BAA/TOCKT
230/THT
reL
13
Be
m8
Bee
37 vss
PIC16F84A
Figure 9-16 PIC16F84A symbol.
{Nation nsruments Comporton 113 Matis Laboratory Workbook17. Close the circuit
Si (Save all your fites.
Close all files.
Leave Multisim open.
End of Lab 9
{Nato Insumenis Corporation 114 pte icoasasinLab 10: MCU Co-simulation
‘The Multisim MCU Module adds microcontroller unit co-simulation capabilities
to Multisim, allowing you to include a microcontroller, programmed in assembly
or C code, within your SPICE modeled circuit.
In this exercise you will create a new MCU Workspace, use the PICI6F84 to run
a counter operation and debug the source code.
FD ote this exercise requires the Multisim MCU Module o be activated ori valid
evaluation period
Goal
1, Create an MCU Workspace and Project.
2. Co-simutate Multisim and the MCU Module.
3. Debug the source code.
Reference Circuit Files
‘The following files are referenced in this exercise. They are located in the
C:\Bxercises\Multisim\Lab10 folder:
© PICUpDownCounter
+ UpDown_Counter.c
Implementation
1. Open Multisim,
a Make sure that a blank circuit pag
create a new workspace.
sin the workspace, otherwise
© Natoral nsamentsCopraton 115 ‘M Matisin Labratry WorkbookThe MCU Workspace
The MCU Workspace is special location in the Design Toolbox that includes all
the information of the project, as well as dedicated folder where the build files,
source code files and any necessary file for the MCU are stored. It is
recommended that you have this folder located in the same folder as your
Multisim file.
2. Place the MCU on the blank workspace.
1 Place the PICI6F84 component located in the Master database,
MCU Module group, PIC family. The MCU Wizard launches
‘when you click to place the component.
3. Configure the MCU Wizard.
(1. Step 1 of the MCU Wizard requires you to provide a path and a
name for your project workspace. Select the folder where you are
saving your finalized exercises and provide a name for the
workspace such as MyMCUPro ject.
(1 Click Next when you are ready to continue.
[J InStep 2 of the MCU Wizard you configure the Project Settings.
Project Type: Standard
Programming Language: C
Assembler/Compiler Tool: HI-TECH PICC-Lite Compiler
Project Name: C Code Project
1D InStep 3 leave the defaults to add a new source file named ma inc.
Click Finish.
4, Save the circuit,
a 1. Save the Multisim file as PICUpDownCounter.
(Wat instunentsCrporton 116 ta comnts5. Review the Design Toolbox.
(If you expand all branches in the Design Tootbox it should look like
the following figure.
5+ PicUpDownCounter
BB MyMcUProject_
© fa cove Protect
Figure 10-1 MCU Project in the Design Toolbox.
6. Enter Source Code.
(Double-click the C source code file main.e to open the Source Code
Editor. Here is where you can enter the source code for your project,
or copy and paste from other source files.
G_ Use a text editor (like Notepad®) to open and copy the entire C code
from UpDown_Counter.c located in the
C:\Exercises\Multisim\Lab10 folder.
Delete the contents of the mai
Editor.
.¢ source file in the Source Code
Paste the source code you copied from the UpDown_Counter.c file.
a
Right-click anywhere inside the editor window and select Show Line
‘Numbers.
(i) Save the source code file.
© Natonalinstumens Corporate 7 tsi Laboratory Workbook7. Review the MCU Code Manager.
B Select MCU » MCU PICI6F84 U1 » MCU Code Manager. You
can also right-click any of the MCU related entries inthe Design
‘Toolbox and select MCU Code Manager.
‘You can manage all your project files from this window.
i
E
Figure 10-2 MCU Code Manager.
1D Click OK to exit.
© Nationa stments Carpoaton 118 ipiconimutsinPlacing and Wiring Peripherals
8. Build the complete circuit
1 Click the top-level circuit PICUpDownCounter in the Design
‘Toolbox. This will take you back to the circuit diagram.
Build the circuit shown in the following figure, use this table as a
guide to locate and configure components.
Group Family Component Value | RefDes
Sources | Power Sources VSS 0 vss
Sources | Power Sources vb 5 vp
Sources | Power Sources GROUND 0
Basic __| Resistor 10k 1a | RI
Basic _| Resistor 10k joa | R2
Basic __| Switch SPST keyd |
Basic | Switch SPST Kyr | 2
Indicators | Hex Display | SEVEN_SEG_COM_A ul
voo vo yoo vp
sv ov *v ov
Key=R
2 RUN
Key =D u w
DIRECTION =
Loo =i | —#
Ri be =
10k S10kN L z
PICIGFS4
_|_vss Display
ov
Figure 10-3 MCU test circuit.
Wat stamens Crparaton 119 | tats Laboratory WoAbookCo-simulating MCU and Multisim
9, Simulate the circuit,
o
Right-click the C Code Project in the Design Toolbox and select
Set Active MCU Project.
Start the simulation,
Confirm the dialog to build the source code.
‘The display should start counting up; click J1 and J2 to modify the
behavior.
Stop the simulation.
Debugging Features
10, Debug your source code.
National Instruments Corporation
Double-click the main. file in the Design Toolbox under C Code
Project.
If line numbers are not visible, right-click anywhere inside the editor
window and select Show Line Numbers.
Right-click line 49 where the following line of code is:
if ( nIndex «= -1) ( nindex = 15; }
and select Toggle breakpoint, You can also double-click the left
border at line 49. You will notice the breakpoint with a red circle on
the left border.
Go back to the top-level circuit and make sure that J1, the direction
switch is open. Start the simulation,
Confirm the prompt to re-build the project.
Click the J1 direction switch, the simulation will hit Pause and the
Debug View will open and stop at the line of code of the breakpoint.
120 ip: commis‘Source file debug listing: main.c
46 (00387) )
2 [a else
48 (00380) ( mndex=-;
l> 49. (00320) af (nindex == -1)
sot I ,
Si [003F7} delay ():
52 [003F9) >
Figure 10-4 Debug View.
Experiment with the debug tools in the Simulation and MCU
toolbars
Figure 10-5 Debug tools.
11, Open the Memory View.
Sl ©. With the simulation paused, select MCU » MCU PICI6F84 Ul »
Memory View. Review all memory view sections,
0000 0000 oan 00
3 | |00 '00 00/00 00 00 00 00
}00 00 |00 |00 [00 00 |o0 00
Figure 10-6 The Memory View.
(Matera nsburents Carraton 421 tsi Lateran Workbook12, Wrap up the project.
B (After you are done experimenting with some of the tools, right-click
inside the source code editor and select Remove all breakpoints.
= (D_ Stop the simul:
1D Go back to the main circuit file and Save it.
(1 Close all files and leave Multisim open,
End of Lab 10
© Nationa stuments Copraton 122 pwn commisLab 11: Educational Features (Optional)
In this exercise you will experiment with the educational features of Multisim
including the Virtual Breadboard, Component Faults, Global and Circuit
Restrictions, Circuit Description Box and Ladder Logic.
BD ote This exercise requires yout have NI Molisim Education Edition installed The features
described in this exercise are not included in the Professional Editions.
Goal
1. Examine a ladder diagram circuit
Create an audio trigger in the Circuit Description Box.
Build a black-box circuit using component faults and circuit restrictions.
Create and wire up a virtual breadboard based on an existing circuit.
Reference Circuit Files
following files are referenced in this exercise. They are located in the
C:\Exercises\Multisim\Lab11 folder:
* LadderlogicLab
+ Dbox
+ ELVISBreadboardDiffAmp
+ black box_puzzlel
© LadderLogiclab_complete
© Dbox_complete
+ ELVISBreadboardDiffAmp_complete
© black_box_puzzlel_complete
© tada.wav
Implementation
1. Open Multtisim.
Close any open circuit
Waterton Corporation 123 tis Laboratory Worbookit
ta]
iH
i
it
(Nato InsvurentsCoprson
Ladder Diagrams
2, Load circuit file
a
Open circuit file LadderLogicLab located in the
C:\Bxercises\Multisim\Lab11 folder.
3. Simulate the circuit
0
a
Start a simulation,
‘Toggle the switches to observe the output in action, Notice that the
outputs for AND, OR and NOR function as expected but XOR does
not.
Open the Subcircuit and observe how it works.
Stop the simulation.
4. Add the XOR logic,
a
Place a new ladder rung to the right of label XOR RUNG; you can
click the Place ladder rungs button on the Ladder diagram toolbar.
Press or right-click to finish placing rungs.
Click the Place Ladder Diagram button on the Ladder diagram
toolbar.
Select the LADDER_CONTACTS family and choose the
RELAY_CONTACT_NO component, this is a normally open relay
contact. Place the component on the XOR rung.
Open the properties of the relay contact you just placed and ensure
that under the Value tab the controlling device reference is M2.
‘This relay will now be open unless the output of M2 on the OR rung
is HI.
Repeating the above procedure add a RELAY_CONTACT_NC
(normally closed relay) to the right of the first relay you placed on
the XOR rung and set its controlling device to M1. This relay will be
closed unless the output of M1 on the AND rung is HI.
124 pts. comimatisen1 Place now a RELAY_COIL component located in the
LADDER_RELAY_COILS family. Place this component at the
end of the XOR rung.
te
(1 The XOR rung should be similar to the following figure,
XOR RUNG [it ——i &
Figure 11-1 The completed XOR rung.
5. Add the XOR OUTPUT logic.
1 Place a new ladder rung to the right of label XOR OUTPUT,
RUNG; you can click the Place ladder rungs button on the Ladder
gram toolbar.
[ii
[1 Press or right-click to finish placing rungs.
[Place a RELAY_CONTACT_NO component in the new rung,
make sure the Controlling Device Reference is set to the value of
the coil you placed on step 4, in this case M3.
fit
B
Place an OUTPUT_COIL located in the
LADDER_OUTPUT_COILS family; place it to the end of the
XOR OUTPUT RUNG.
D_ Open the properties of the output coil and in the Value tab set the
Output Module Base Address to 200, and the Output Number to
4.
x10 v4
XOR OUTPUT RUNG —| O-
M3
2004
Figure 11-2 The completed XOR Output rung.
‘National nsturents Corporation 125 kas Laboratory Wortbook6. Simulate the circuit.
Start a simulation,
(Observe the operation of XOR as you toggle the switches.
Stop the simulation.
7. Close the circuit.
a Save the circuit file.
Cl Close all files and leave Multisim open.
Circuit Description Box
8. Load circuit file.
Z| Open circuit file DBox located in the
C:\Exercises\Multisim\Labl1 folder.
9. View the Description Box.
(1 If the Cireuit Description Box is not open select View » Cireuit
Description Box.
Q ti the Cineuit Desription Bor lke al ofthe dockableswindows in Multsim can be moved
to any location within your application window.
(Water nsramens Comporation 126 tte nicominasin10, Edit the Description Box.
1e Select Tools » Description Box Editor.
Select Insert » Insert Object.
(1. Scroll through the list and select Media Clip. Click OK.
(1 The Media Player now appears, select File » Open to select a “.wav”
file. ‘The Media Player should default to a location where “.wav"
files are stored (C: \Windows\Media\). You can also select the
tada.way file located in the C: \Exercises\Multisim\Labl1
folder.
Select File » Exit and return to.
© Toallow objects and text to react to circuit simulation you must
create Labels. Click the new “.wav" file you placed to select it, then
select Insert » Insert Label. Type sound and click OK.
(1 Close the Deseription Box.
11. Create a trigger to interact with the sound label.
(2 Click the Measurement Probe icon on the Instruments toolbar and
place it in the XOR output wire as shown in the following figure.
AND NOR XOR
OR
° 25V ° ov ihasy O sv
¥
Vp-p):
ems):
200 ide):
I
Up):
isms):
Hae):
Frea,
Figure 11-3 Placing the Measurement Probe.
© National Instruments Coperaton 127 Muti Laboratory Workbook(Double-click the Probe to edit its properties. On the Description Box
tab you will create a new trigger. Click New.
(J. Inthe Condition box, click the arrow to the right of this box and
select Voltage.
(Click the arrow again and select now the greater than or equal to
symbol (>=).
(Type the number 2.5. The expression should be V>=2.5 which
‘means that this condition will be met anytime the voltage measured
by the probe is larger than or equal to 2.5 V.
(Inthe Action drop-down menu select Play Media Clip and in the
Parameter text box type the name sound. Click OK to apply
changes and exit.
(Select View » Circuit Description Box and verify that the Cireuit
Description Box is visible
12, Simulate the circuit.
Start a simulation, every time the XOR wire is true (toggle the
switches) the sound should play.
Stop the simulation,
13. Close the circuit,
Be) CO Save the circuit file
Close all files and leave Multisim open,
atonal Istuments Conraton 128 pw ncomdmutisin© atonal IsteentsCopraton
Black Box
14, Load circuit file.
Open circuit file black_box_puzz1e1 located in the
C:\Exercises\Multisim\Labl11 folder.
15. Replace components by Subcircuit
[Select all the components and nets within the dashed box.
(Select Place » Replace by Subcircuit. Enter a name X and click
OK.
(1. Select Options » Circuit Restrictions. Place a checkmark in the
Lock subcircuits option. Click OK.
1 Now the file isa black-box puzzle. You can password-protect these
settings if you click the Password button in the Cireuit Restrictions
dialog.
16. Close the circuit,
1 Save the circuit file.
(1 Close all files and leave Multisim open,
129 Matas Laboratory WorkbookVirtual Breadboard
The Virtual Breadboard is an educational feature that allows users to create a
graphical representation of the wiring of a real breadboard based on a circuit. The
breadboard displays parts using a 3D model and allows them to be placed on a
breadboard and wired up just like in the real world.
17. Load cirenit file.
Open circuit file 2LVISBreadboardDi £fAmp located in the
C:\Exercises\Mult isim\Lab11 folder.
18. Review the circuit,
( Thisis a sample circuit that represents a Variable Gain Differential
Amplifier. The circuit is already wired for your convenience.
19. Create a new breadboard,
(1. Select Tools » Show Breadboard or click the Show Breadboard
button on the Main toolbar. This will create a new unpopulated 3D
ELVIS breadboard,
B Note the 3D ELVIS breadboard will appear if you are working on an ELVIS Schematic. If
you are working on a generic Multisim workspace schematic then a generic breadboard will
© Natenal nsramentsCoporston
20. Experiment with the breadboard,
(1 Now that the breadboard is visible you can rotate it if you click and
hold then move the mouse around the screen.
(D_ The mouse wheel zooms in and out.
Ifyou click and hold the middle mouse button then move the mouse
you will change the center of the breadboard.
130 pti. comtrstsinFigure 11-4 The 3D ELVIS Breadboard.
(J The area at the bottom of the screen is the Parts Bin that contains all
the parts from your circuit that are not placed already on the
breadboard,
1D. Click and hold a component from the Parts Bin and move it to the
breadboard, then release the mouse button to place. You can also
rotate the component in mid-air with .
1 Click one of the breadboard pin holes to start a wire, and then click
to end it in the new location. When you click a line
iz J Click the DRC and Connectivity check button to see if you are
missing any cabling or wired any component incorrectly.
€WatnalinsrurentsCopraton 131 sin Lataratoy WorkbookFigure 11-5 The 3D ELVIS Breadboard.
21, Close the cireuit
Save the circuit file
2 Close all files.
(Exit Mattisim,
End of Lab 11
© atonal nstuments Corporation 132 ipa. comtotisin