Introduction to Multisim for Digital Circuits
.Please download this document and type in your answers to questions for parts 1, 2, and 3; and save this document using the following format: CE212Lab1Afirstname_lastname.doc.
Introduction
Electronic circuits consist of two general classes. The first class, called analog circuits, are circuits in which electrical quantities can have any value over a range. The second class, called digital circuits, are circuits in which electrical quantities can have only specific values. To illustrate the concepts of analog and digital, compare using a dimmer switch and toggle switch to control the lights in a room. A dimmer switch represents analog control, as it allows you to adjust the brightness of the lights to whatever level you wish. A toggle switch represents digital control, as it allows you to set the lights to only two specific states: on or off. The most common digital circuits are binary digital circuits, which means that each signal has only two valid states. Although you can use multimeters and oscilloscopes to observe the operation of digital circuits, you will typically use these instruments only when troubleshooting. This is because signal logic levels (HIGH or LOW)and relative timing between signals, rather than exact amplitude and timing information, are important for normal operation of digital circuits. Special instruments, such as logic probes and logic analyzers, exist for measuring logic levels and signal timing in digital circuits. Logic analyzers use a special digital signal, called a clock, to coordinate the time at which it takes samples. You will learn more about clock signals in this experiment.
In Part 1 of this experiment, you will familiarize yourself with the Multisim tools for observing digital circuits. In Part 2, you will use the logic probe to examine the operation of some digital circuits. In Part 3, you will use the logic analyzer to observe multiple logic signals simultaneously.
Reading
National Instruments, NI Circuit Design Suite: Getting Started with Circuit Design Suite, Chapters 1 and 2
Multisim Files
Part 2: Digital_Exp_01
Part 3: Digital_Exp_01
Lab Objectives
Part 1: Describe the common Multisim instruments and components associated with digital circuits.
Part 2: Show how to access and use the Multisim logic probes.
Part 3: Show how to access and use the Multisim logic analyzer to observe the operation of a digital circuit.
Part 1a: Multisim Digital Tools
In this part of the experiment you will learn the tools that you will use to work with most digital circuits.
1a.1 The Component Toolbar
The Component Toolbar, shown in Figure 1-1, contains tools that let you access various components with which to create and analyze digital circuits.
The component tools with which you will most often work for basic digital electronics are the Place Source, Place TTL, Place CMOS, and Place Indicator tools, shown in Figure 1-2.
1a.2 The Instruments Toolbar
The Instruments Toolbar, shown in Figure 1-3, provides instruments with which you can measure and
evaluate the operation of circuits. Some instruments, like the multimeter, oscilloscope, and logic analyzer, are real devices that technicians and engineers use to analyze real-world circuits. Other instruments, like the Bode plotter and logic converter, exist only within the Multisim application and are convenient tools for you to simulate, analyze, and debug your circuit designs.
The instrument tools with which you will most often work for digital electronics are the Function Generator, Frequency Counter, Word Generator, Logic Analyzer, and Logic Converter tools, shown in Figure 1-4.
1a.6 Identifying Multisim Digital Tools
1) Start the Multisim program.
2) Use your cursor and the Multisim tooltip to identify each of the digital tools shown in Table 1-1.
Questions for Part 1
1) Would the mercury thermometer with the numbered scale shown in Figure 1-5 be considered analog or digital in nature? Why?
2) Would you probably design a digital circuit or analog circuit to grade multiple-choice tests? Why?
Part 2: Digital Measurements in Multisim
1a.7 Using Probes
In Multisim, probes are visual indicators that allow you to determine whether the state of a signal line is HIGH or LOW. When the probe is lit, the logic state is HIGH, and when the probe is not lit, the logic state is LOW.
1) Open the file Digital_Exp_01.
2) Select the Place Indicator tool on the Component Toolbar. This will open the component browser
with the indicator components, shown in Figure 1-6.
3) Select “Probe” from the Family: window.
4) Select “PROBE_DIG_RED” from the Component: list.
5) Click the OK button and place the probe above Q0
junction, as shown in Figure 1-7.
As you can see, the probe is a very simple device. When you connect a probe into a circuit, it measures
and compares the voltage on its pin to a threshold value (in this case, the default value of 2.5 V). If the
signal voltage is greater than the threshold value the probe lights up, indicating a HIGH. If the signal
voltage is less than the threshold value, the probe does not light up, indicating a LOW.
6) Connect the probe X1 to Q0. Note that the junction for Q0 disappears when you do so.
7) Connect a “PROBE_DIG_GREEN” to Q1.
8) Connect a “PROBE_DIG_BLUE” to Q2. The circuit should now look like that in Figure 1-8.
9) Start the simulation.
10) Press the space bar to close switch J1. This connects the 10 Hz clock signal to the circuit.
11) When the state of the probes changes, press the space bar again to open switch J1.
12) Record the state (a state occurs each time you open and close the switch) of the output for each probe in Table 1-2. If the probe is not lit, write “LOW”. If the
probe is lit, write “HIGH”.
13) Repeat Steps 9 through 11 until you have completed the table.
14) Stop the simulation and close the circuit without saving.
Table 1-3: Logic Analyzer Circuit States
Time Division
Q0 (Red)
Q1 (Green)
Q2 (Blue)
1
2
3
4
5
6
7
8
9
10
Questions for Part 2
1) From Table 1-2, how many unique states does the circuit appear to have?
2) From Table 1-2, does there appear to be any pattern to how the state of each probe changes?
3) If the frequency of the clock had been 10 kHz rather than 10 Hz, so that the probes changed state one thousand times faster, how easily could you have completed Table 1-2?
Part 3: Using the Logic Analyzer
As you should have determined Part 2 of the experiment, probes are a convenient way to determine the logic state of signal lines but have limited value at high frequencies. The logic analyzer also allows you to determine the logic state of signal lines but can operate at much higher frequencies.
1) Open the file Digital_Exp_01.
2) Select the Logic Analyzer tool on the Instruments Toolbar.
3) Place the logic analyzer above and to the right of the circuit, as shown in Figure 1-9.
Figure 1-9: Circuit with Logic Analyzer
As Figure 1-9 shows, the logic analyzer is more complicated than a probe although it has the same
basic function. It has 16 data inputs along its left side, each of which acts like a probe. Three control
inputs on the bottom determine when the logic analyzer checks, or samples, the voltages on the data
inputs. If the voltage is above the set threshold value (in this case the default value of 2.5 V), the logic
analyzer records that the data sample is HIGH. If the voltage is below the threshold value, the logic
analyzer records that the data sample is LOW.
When you specify that the logic analyzer should use an external clock, the logic analyzer uses the “C”,
or clock, input to synchronize when it takes samples.
The “Q”, or qualifier, specifies whether an externally supplied clock should be HIGH (H), LOW (L) or either (X) to sample data.
The “T” input instructs the logic analyzer to look for a specific pattern of data inputs to begin sampling data.
4) Connect the first three data inputs on the top left side of the logic analyzer to the Q0 through Q2
junctions. Note that when you do so, the junctions will disappear.
5) Connect the logic analyzer’s clock (“C”), qualifier (“Q”), and trigger (“T”) inputs to a point on the
right side of the switch. The circuit should now look like that in Figure 1-10.
Figure 1-10: Circuit with Logic Analyzer Connections
6) Double-click on the logic analyzer to expand it. Figure 1-11 shows the expanded view.
Figure 1-11: Logic Analyzer Expanded View
As the dots inside the connections for the data and control inputs show, the first three data lines and the external clock, qualifier, and trigger lines for the logic analyzer are connected.
7) Click the Reverse button to change the display background from black to white. This is optional, but
may allow you to see the logic signals and measurement divisions more easily.
8) Set the Clocks/Div value in the Clock section to “1”.
9) Click the Set... button in the Clock section. This will open the Clock setup window, shown in Figure
1-12.
Figure 1-12: Logic Analyzer Clock Setup Window
10) Select External in the Clock Source section. This will set the logic analyzer to ignore the Clock Rate
setting for its internal clock and to use the circuit clock, connected to the “C” input, to sample data.
11) Click the button next to the Clock Qualifier box and select “1” from the drop-down list.
12) Change the Pre-trigger samples value to “1”. This will have the logic analyzer save the one data
sample that occurs just before the specified trigger.
13) Change the Post-trigger samples value to “10”. This will set the logic analyzer to collect ten samples.
Because the logic analyzer is using the circuit clock to sample data, and is set for 1 clock per division,
the logic analyzer will collect one data sample per division for ten clock pulses.
14) Click the Accept button to keep your changes.
15) Click the Set... button in the Trigger section. This will open the Trigger Settings window, shown in
Figure 1-13.
Figure 1-13. Trigger Settings Window
16) Select “Positive” in the Trigger Clock Edge section. This will cause the logic analyzer to look for a
trigger when the input on its “T” input changes from LOW to HIGH.
17) Click the button next to the Trigger Qualifier box and select “1” from the drop-down list. This will
require the “T” input to be HIGH when the logic analyzer finds a valid trigger.
18) Change the first three values in the Pattern A box from “xxx” to “000”. This will instruct the logic
analyzer to look for LOW signals on all three data inputs as the trigger qualifier.
19) Click the Accept button to keep your changes.
20) Start the simulation and allow the simulation to run for several seconds.
21) Press the space bar to close the switch J1. This will connect the 10 kHz clock signal to the circuit.
22) When the logic analyzer stops collecting data, stop the simulation.
23) Side the scroll bar at the bottom of the logic analyzer display window all the way to the left to view the beginning of the waveform. The logic analyzer display should look similar to that in Figure 1-14.
The solid vertical line between the first and second divisions indicates when the logic analyzer found a
valid trigger (000). The data to the left of the line is the pre-trigger data (data before a valid trigger
occurred), and the data to the right is the post-trigger data (data after a valid trigger occurred).
24) Record in Table 1-3 the logic levels for each of the ten time divisions for the logic analyzer display. If
the waveform for an output is low, write “LOW”. If the waveform for an output is high, write “HIGH”.
Table 1-3: Logic Analyzer Circuit States
Time Division
Q0 (Red)
Q1 (Green)
Q2 (Blue)
1
2
3
4
5
6
7
8
9
10
Questions for Part 3
1) From Table 1-3, how many unique states does the circuit appear to have?
2) From Table 1-3, does there appear to be any pattern to how the state
of each data line changes?
3) Does the circuit operation appear to be any different at 10 kHz compared to 10 Hz?
The circuit operation appears to be identical.