...

Session 1B USE OF CIRCUITMAKER AS A DIGITAL SIMULATION TOOL IN

by user

on
Category: Documents
53

views

Report

Comments

Transcript

Session 1B USE OF CIRCUITMAKER AS A DIGITAL SIMULATION TOOL IN
Session 1B
USE OF CIRCUITMAKER AS A DIGITAL SIMULATION TOOL IN
FRESHMEN EET COURSES
Gerard Foster1
Abstract ?
CircuitMaker (CM) is a digital and analog
simulation application that is well suited for the introduction
of digital electronics. The author was introduced to
CircuitMaker 2000 through his involvement with Project
Lead The Way (PLTW). High school teachers teaching the
PLTW Digital Electronics course throughout Indiana and
the country use this simulation software. The author has
taught this package to Indiana teachers at the PLTW
Summer Training Institue at Purdue University and he has
used it in his freshman digital electronics courses. Because
the CM simulations are presented in quasi-real-time with
high logic level lines presented in red and low logic levels in
blue, the students gain an immediate sense of the dynamic
nature of circuit operation. The students have responded
enthusiastically to this package. The simulator has been
used to introduce students to digital systems such as
synchronous and asynchronous serial communication
systems, multipliers, keypad encoders, stepper motor
positioning systems, data bus display multiplexers, and
memory bus systems. This paper presents this software and
some of the digital systems that have been implemented.
INTRODUCTION
In the past, many EET freshmen in the author’s digital
courses have not embraced digital simulation. That posture
has changed with the introduction of CircuitMaker in these
freshmen classes. The most outstanding impact is that the
free-running nature of the simulation operation, in which the
high voltage wires are colored red and the low voltage wires
are colored blue, engages the student immediately.
Problems are more readily identified as the student views the
action and “what if” questions are provoked leading to
extensions of the circuit under study. The package is easy to
use. It has some flashy output devices such as “smart”
ASCII displays, stepper motors and even a rocket launcher.
CircuitMaker 2000 [1] is the circuit simulator that
Project Lead The Way (PLTW) [2] has selected for the
Digital Electronics course delivered in the sophomore year
in high school. Project Lead The Way is a non-profit
organization that provides a pre-engineering curriculum to
middle schools and high schools. Digital Electronics is one
of the courses in the PLTW curriculum and CircuitMaker is
the circuit drawing and simulation package that high school
students in Indiana and across the country are using. The
author learned to use this package at a Project Lead The
1
Way Master Teacher training session held at Rochester
Institute of Technology. [3] The student version of
CircuitMaker based on CircuitMaker 6 is available for
students on the web and on the CD-ROM accompanying the
class textbook, Tocci and Widmer’s Digital Systems.
Freshman students really liked to work with it.
Selected features of CircuitMaker are presented in the
section below followed by a section on digital systems
simulation.
CIRCUITMAKER FEATURES
Basic features
CircuitMaker supports both analog and digital simulation.
The circuit is drawn in the edit mode and its operation is
simulated in the simulate mode. Waveforms at various
points in the circuit can be captured and displayed using
devices called scopes and probes. The simulation is
particularly good as an introduction to digital electronics
because low-state lines are presented in blue color and highstate lines are presented in red color. As logic levels in the
circuit change by clicking the mouse on input switches and
with the transition of clock inputs, the line colors change
giving the student and immediate visual feedback showing
the operation of the circuit.
This paper is concerned only with the digital mode
of operation. In the student version of the package, there are
118 7400-series digital devices (plus some half-device
versions) and 48 4000-series digital devices. The student
version is the same as CircuitMaker 6 with the following
limitations:
? 50 device (any type) maximum per design,
? 1000 device library limit,
? Symbol editor and Macro capability disabled. [4]
Enhanced features
Adding to the attraction of this simulator is the rich set of
displays, instruments, actuators, and switches that operate in
quasi-real time. Shown below are drawing of some of the
devices available.
Gerard Foster, Dept. of Electrical and Computer Eng. Tech., Purdue University, P.O.Box 9003., Kokomo, IN 46904, [email protected].
American Society for Engineering Education
April 4-5, 2003 – Valparaiso University, Valparaiso, IN
2003 IL/IN Sectional Conference
35
Session 1B
DISP3
DISP1
V+
DISP2
L1
4 32 1
abcdefg.
7
6
5
4
3
2
1
CP
ASEE IL-IN
2003
L2
D1
LED1
FIGURE. 1
SELECTED DISPLAYS IN CIRCUITMAKER
The array of displays includes common-anode and
common-cathode 7-segment displays, 7-segment displays
with built-in decoders, LEDs, incandescent lamps, and a
smart ASCII display (fourth from the left) that has a moving
cursor and the ability to be cleared by entering the HEX
value 0xC.
Figure 2 shows input devices. The first two switches
allow multiple outputs for a single button push. The third
switch is a logic switch for general use. It does not require a
pull-up or pull-down resistor. The fourth through the
seventh switch act like their real-life counterparts and each
requires power, ground, and appropriate resistors. The last
device is a cross-point keypad. An application problem is to
design, draw, and implement the encoding circuit for this
keypad.
M1
1
2
A
3
4
B
FIG. 4: STEPPER MOTOR
A full step is indicated as a movement of 90 degrees. A
half step is indicated as the movement of 45 degrees.
The simulator has the usual set of analog and digital
electronic devices, mulitmeters, and a scope feature.
Simulation is separated into the analog mode and the digital
mode. The digital mode performs the simulation in terms of
clock ticks. Some devices are typed as analog, digital, or
mixed (analog/digital). The 555 timer must be implemented
in the analog mode as is the case for the A/D converter.
DESIGNING DIGITAL SYSTEMS
The devices above are merely shown as an introduction to
the types of auxiliary devices that are available. The real
SW1
power of the simulator is in easily assembling and
y4 C D E F
KPD1
KBD1
V1
S4
S3
y3 8 9 A B
0V
S1
demonstrating digital systems.
S2
0
A
y2 4 5 6 7
y1 0 1 2 3
4321
Large circuits are sometimes too complicated to
S76 5432 1
x1 x2 x3 x4
construct in the laboratory without devoting valuable time
and resources. Such was the case when designing the circuit
FIGURE. 2
shown in Figure 5 that was used to illustrate data buses and
SET OF SWITCHES AVAILABLE IN CIRCUITM AKER
device addressing.
In this circuit, the data sequencers are like memory
Figure 3 shows some special launching pad devices that devices. In the simulator, the dark blocks in the diagram are
add pizzazz to a circuit output. An output signal can launch the 7 LED segments being displayed. Each display in this
a rocket or a car. The reset button restores the vehicle. The circuit is multiplexed to show a letter in an 8-letter word or
window acts as an input device. The window is raised and phrase. One of two phrases or words can be displayed
lowered by clicking on it.
depending on the data sequencer selected. In a previous
laboratory, the student designs a state machine that displays
Animated Devices
an 8-character message, such as ‘ColdSodA’, on a single 7segment display one character at a time. An attempt was
RKT2
WND1
made to have the students parallel their circuits in the
RKT1
V1
CAR1
5V
fashion shown above. But it soon was evident that the
+
+
wiring across many boards would have turned the exercise
Reset
Reset
Reset
into a major project at a time that we needed to get on to
different issues.
Figure 6 shows an asynchronous serial communication
FIGURE. 3
circuit in which the ASCII characters stored in the Data
ANIMATED DIGITAL DEVICES IN CIRCUITMAKER
Sequencer (a sequential memory device) are transmitted
One would hope that the students would not get stuck serially across a single data line from transmitter to receiver.
on using these devices. And they do not. There are plenty This circuit was the culmination of a project that was started
as a simple shift register transmitter that evolved into a
of problems in digital electronics to keep them busy.
A stepper motor is shown in Figure 4. This motor does synchronous transmit/receive circuit with LEDs as outputs.
not require the driver circuit that is necessary for a real After the initial design, the instructor provided a working
stepper motor. The simulation is shown as the movement of circuit and asked the students to provide modifications to
extend the design. The final circuit above is implemented
the radius shown in the center circle.
within the 50-component limit imposed by the student
version of CircuitMaker.
American Society for Engineering Education
April 4-5, 2003 – Valparaiso University, Valparaiso, IN
2003 IL/IN Sectional Conference
36
OC
NO
C
NC
S
F
Session 1B
V7
5V
+V
Device Selection (Address Decoding) and Data Bus Interfacing
to 7-Segment Displays from Data Sequencers Programmed for
Serial Messages.
U12
74LS138
74LS138
Q7
Q6
Q5
Q4
Q3
Q2
Q1
Q0
Data Sequencer 1 contains the message "PurduE" and Data
Sequencer 2 contains the message "EEt159".
V+
CP1
CP2
OE
D7
D6
D5
D4
D3
D2
D1
D0
6
5
4
3
2
1
abcdefg.
CP
Q7
Q6
Q5
Q4
Q3
Q2
Q1
Q0
U8
OE
D7
D6
D5
D4
D3
D2
D1
D0
U5
74LS374
CP
Q7
Q6
Q5
Q4
Q3
Q2
Q1
Q0
74LS374
U4
OE
D7
D6
D5
D4
D3
D2
D1
D0
CP
Q7
Q6
Q5
Q4
Q3
Q2
Q1
Q0
U3
OE
D7
D6
D5
D4
D3
D2
D1
D0
U2
E
Q7
Q6
Q5
Q4
Q3
Q2
Q1
Q0
OE
D7
D6
D5
D4
D3
D2
D1
D0
6
5
4
3
2
1
74LS374
U1
OE
D7
D6
D5
D4
D3
D2
D1
D0
V1
5V
+V
U10
74LS373
DS3
Data 8
Seq 7
CP1
CP2
74LS374
CP
Q7
Q6
Q5
Q4
Q3
Q2
Q1
Q0
DS1
Data 8
Seq 7
DISP6
abcdefg.
Q7
Q6
Q5
Q4
Q3
Q2
Q1
Q0
E3
E2
E1
U9
74LS373
V+
DISP5
abcdefg.
abcdefg.
abcdefg.
CP
Q7
Q6
Q5
Q4
Q3
Q2
Q1
Q0
A2
A1
A0
abcdefg.
V+
DISP4
DISP3
DISP2
OE
D7
D6
D5
D4
D3
D2
D1
D0
V6
CP1 Q1
CP2 Q2
TCU
TCD
Q3
Q2
Q1
Q0
V+
V+
V+
DISP1
U6
74LS138
74LS138
74LS374
U7
74LS193
CPU
CPD
PL
MR
D3
D2
D1
D0
CP
Q7
Q6
Q5
Q4
Q3
Q2
Q1
Q0
E3
E2
E1
74LS374
V2
0V
A2
A1
A0
TCU
TCD
Q3
Q2
Q1
Q0
OE
D7
D6
D5
D4
D3
D2
D1
D0
U11
74LS193
CPU
CPD
PL
MR
D3
D2
D1
D0
G.N.Foster
February 9, 2002
EET 159
E
Q7
Q6
Q5
Q4
Q3
Q2
Q1
Q0
FIGURE. 5:
DISPLAY CIRCUIT WITH DATA B US AND C HIP A DDRESSING
12-Bit Asynchronous Serial Communication Circuit
L4
L3 L2
L6
L1
L7 L8
L11 L10
L5
L22
DISP1
7
6
Serial
5
4
3
Communication
2
1
CP
74LS95
Q0
Q1
Q2
Q3
74LS95
U3
DS
D0
D1
D2
D3
CP2
CP1
S
Q0
Q1
Q2
Q3
U2
DS
D0
D1
D2
D3
CP2
CP1
S
DS
D0
D1
D2
D3
CP2
CP1
S
U1
74LS95
Q0
Q1
Q2
Q3
Serial In
V7
5V
!LD Strobe
LD/!SH
CP1
CP2
1
2
3
4
5
6
Data 7
Seq 8
CP2
CP1
Ver.5- Feb. 28, 2002
Added Data Sequencer to
parallel input
U4
74LS193
CPU
CPD
PL
MR
D3
D2
D1
D0
U11C
U12A
U5A
TCU
TCD
Q3
Q2
Q1
Q0
V5
U6C
CP1 Q1
CP2 Q2
U11A
Transmitter
U11B
Ver. 4 - Feb. 27, 2002
Asynchronous communication
version
Ver. 3 - Feb. 27, 2002
Added line from counter decoder output
to clock pulse input of ASCII display.
74LS95
Q0
Q1
Q2
Q3
74LS95
Q0
Q1
Q2
Q3
V6
5V
+V
DS2
V4
5V
+V
U7
Q1 CP1
Q2 CP2
U6B
G.N.Foster
3/11/02
Ver. 6- 3/11/02
Automatic message
writting
control
U8
DS
D0
D1
D2
D3
CP2
CP1
S
V1
DS
D0
D1
D2
D3
CP2
CP1
S
DS
D0
D1
D2
D3
CP2
CP1
S
6
5
4
3
2
1
Data 8
Seq 7
U9
DS1
74LS95
KPD3
7
Q0
Q1
Q2
Q3
4321
Receiver
U10
74LS193
CPU
CPD
PL
MR
D3
D2
D1
D0
TCU
TCD
Q3
Q2
Q1
Q0
U5B
Ver. 2 - Feb. 25, 2002
1) 12-bit pulser simplified.
2) ASCII display added:
Ver. 1 - Feb. 16, 2001
$07 rings bell
Synchronous serial communication
$08 backspace
with 12-bit shift registers.
$0C (form feed) clears the screen.
FIGURE 6.
A SYNCHRONOUS SERIAL COMMUNICATION SYSTEM WITH ASCII DISPLAY
American Society for Engineering Education
April 4-5, 2003 – Valparaiso University, Valparaiso, IN
2003 IL/IN Sectional Conference
37
Session 1B
The final system shown in Figure 7 is that of a memory
system showing how logic lines can be consolidated into
buses. This circuit shows the inclusion of two 1K RAMs
and a 32-byte PROM. The RAMs are volatile and do not
hold the stored values after closing the software.
WE
CE
OE
A3 A2 A1 A0
A 0Bus
1
2
3
S1
U6
74LS138
74LS138
S0
5V
+V
A2
A1
A0
E3
E2
E1
Q7
Q6
Q5
Q4
Q3
Q2
Q1
Q0
2
1
0
D7
U4
RAM1K
A9
A8
A7
A6
A5
A4
A3
A2
A1
A0
D Bus
CS
WE
IO7
IO6
IO5
IO4
IO3
IO2
IO1
IO0
CE
A7
A6
A5
A4
A3
A2
A1
A0
7
6
5
4
3
2
1
0
D6
U2
74LS245
D5
S/R
B7
B6
B5
B4
B3
B2
B1
B0
D4
D3
D2
WE
D1
U1
RAM1K
2
1
0
DsplySt
A9
A8
A7
A6
A5
A4
A3
A2
A1
A0
D0
CS
WE
IO7
IO6
IO5
IO4
IO3
IO2
IO1
IO0
7
6
5
4
3
2
1
0
REFERENCES
DISP1
6
5
4
3
2
1
0
7
6
My name is
5
4
3
2
1
CP
U5
PROM32
CS
3
2
1
0
A4
A3
A2
A1
A0
circuit first, although some students are beginning to
question why they need to breadboard at all.
The simplicity of editing a CircuitMaker file and the
directness of the simulation’s presentation make circuit
simulation enjoyable and manageable.
Motivation to
simulate circuits is high among the students.
CircuitMaker has proven to be an excellent means of
giving students experience in using digital concepts in
complex digital systems as well as a great way to introduce
the students to the basic operations of simple digital circuits.
Taking the student from the elementary stages of digital
analysis to an understanding of how larger digital systems
work is an important step in their future use of digital
electronics in applications such as microcomputer
architecture.
O7
O6
O5
O4
O3
O2
O1
O0
7
6
5
4
3
2
1
0
[1] Protel International Limited, CircuitMaker 2000, the virtual elctronics
lab, 1988-2000.
[2] Project Lead The Way: National alliance for pre-engineering programs
[Booklet], 2000.
[3] Foster, G.N., “K-12 Programs Plug into Technology with Project Lead
The Way Curriculum”, Proceeding of 2002 ASEE Annual Conference,
www.asee.org/conferences/caps/document2/2002-1305_Paper.pdf, June
16-19, 2002, pp. 8.
[4]
Altium Limited, “CircuitMaker Resources”,
www.microcode.com/downloads/student.htm.
FIGURE 7.
MEMORY DEVICES WITH DATA AND A DDRESS B USES
The author has created a number of other digital
systems with this simulator include a stepper motor
positioning circuit with feedback, a keypad encoder built
from MSI devices, and two types of 4-bit multipliers made
with adders and made sequentially with shifters and adders.
CONCLUSION
This paper is a brief introduction to CircuitMaker. It is
currently the digital simulation package that high school
students in the Project Lead The Way curriculum are
learning. It is also a useful tool for introducing college
students to digital electronics. A verbal description of this
simulator does not have the impact of a live presentation. .
The operation of this simulator is best presented live.
Students took to the simulator almost immediately due to
its ease of drawing a circuit in the edit mode and the
dynamic action in the simulation mode whereby the wires on
the circuit change color from blue at low logic levels to red
at high logic levels. In the past, the students were not keen
on the analysis and plot setup required to determine the
operation of the circuit and some students did not like to
simulate a circuit. Now the students ask to simulate the
circuit and are more eager to use the simulator at home. The
author still believes in requiring students to breadboard a
American Society for Engineering Education
April 4-5, 2003 – Valparaiso University, Valparaiso, IN
2003 IL/IN Sectional Conference
38
Fly UP