Professional Documents
Culture Documents
Introduction
Theavailability
of lowcostmicroprocessors created a great dealof interest
inthedesignofmicroprocessor-based
controlsystems.Tofamiliarizethestudents with the microprocessor control, a
set of new experiments are added to the
introductory control laboratory at MichiganStateUniversity
[ I ] . In theseexperiments, the microprocessor is used to
acquireanalogdata
by interfacingan
analog to digitalconverter: to outputa
digital data which if used in conjunction
withadigitaltoanalogconverter,
providestheanalogoutput;tocontrolthe
position ofa D.C.Servomotor;andto
control the speed of a stepper motor. The
purpose of this paper is to give a detailed
description of these experiments and the
equipment used.
in theseexper-
20
Experiments
Equipment
Theequipmentused
iments consists of
Fig. 3. PositionServosystem:
#steps
rev
60
-* - Hz
(1)
in Fig. 3 .
8 DATA
LINES FROM
PERIPHFR~L
DATA
LINES FllOM
PERlPHERIl
CONTROI
LINES
K":;;"":"T",/"'"
I IVES
rj
RSO = 0
fl
RS1 = 0
CRA2 = 0
REGISTER A
CONTROL
REGISFER E
"0'
"1
'
INPUT
OUTPUT
- GRD
- PWR
l+5!
REGISTER
A
INTERRUPT
RESET
READ
A TO hlPU
RSl = 0
I
)7
"
\/
OR
WRITE R E G 8
l SDTA
t HT A
SELECT
FROM
LINES
TO PAPU
MPU
REGISTER B
F;
ENABLE
/ - "%
-
hlPU FROM
ADDRESS
LINES
RS1 = 1
= 1
INTERRUPT L-"-f
E TO hlPU
CHIP
SELECT
FROM hlPU
ADDRESS
LINES
22
Comments
Losd ACCA with zero
0000
86
0002
B7 8005
0005
B7 8007
Enable
Direction
Data
Register B
00
B7 8004
0008
FF
OOOB
86
OOOD
B7 8006
86
0002
B7 8007
0005
86
0007
B7 8006
Enable DDRB
OOOA
Fig. 8. PIA Initialization.
86
0002
B7 8007
0005
86
0007
B7 8007
OOOA
CE HHHH
OOOD
09
OOOE
00 10
30
26
Comments
30
FF
Define PBO-PB7 as
outputs
04
86
oooc
B7 8007
OOOF
86
0011
B7 8006
0014
CE
0017
09
0018
26
OOlA
4c
00 1B
20
Enable Peripheral
data register B
01
CB2 = 0
34
CB2 = 1
Delay = 2
FD
86
0011
B7 8007
CB2 = 0
0015
CE HHHH
T
Delay = 3
0018
09
0019
26
OOlB
7E 0005
Comments
00
HHHH*
Delay
FD
Increment ACCA
Branch t o 0011
F4
*H = Hex number
Delay = 1 3 Sec.
~ multiplied by the decimal value equivalent
of the hex number, HHHH
Fig. 9. LED program.
FD
Jump to 0005
DAC
ANALOG
VOLTAGE
OUTPUT
JI
GND
Fig. 11. Interfacing ADC and DAC to the microprocessor.
21PFJ0-PB7 as WIPUIS
31CA2 line as Output
41Clea1 ntermpls
B?
86
neby a
sarnpk lime
2E
Instruction (HEX)
0010
86 04
0012
B7 8005
Enable peripheral
- data Register A
0015
87 8007
Enable peripheral
data Register B
0018
B6 8004
Clear Interrupts
OOlB
86 34
OOlD
8005
0020
3C
0022
B'7 8005
0025 34
86
0027
B7 8005
002A
B6 8005
002D
Comments
Output a convert
pulse on the CA2
line
Conversion complete?
FB
002F
B6 8004
0032
B7 8006
0035
CE .HHHH
0038
09
0039
26 FD
003B
7E OOlB
Delay
Jump to 00 1B
_____
Concluding Remarks
I
Fig. 14. Data acquisition board associated withthe position Servo.
24
The
experiments
described
in
this
papercomplement
verywellwiththe
other experiments in the lab dealing with
the analog control systems [I], and form
a basis to understand and design real time
control systems using a microcomputer.
We found that this can be done
witha
ZIPBb-PB7 as outputs
3)Clearinterrupts
(HEX)
Instruction
Memory
Loc
(HEX)
Comments
-V
Outputaconvertpulseona
CA2 line
97
0032
Store
a c t ut ahle
81
position
96
0036
C90o m p4u1t e
0038
B7
003A
C EH H H H
003DDelay
09
003E
26
on P B W B 7 lines
0040
7 E OOlB
&+
Determine the error between the
desired position and the actual
position
80
0034
Loop
8006
the e r r o r
Otuhtep u t
error
FD
Repeat
minimal
comouter
background.
Many of
the students are motivatedbythis
experience and pursue further work in the
form of independent study. This usually
and construction of
involves
the
design
microprocessor
based
systems.
Typical
Phillips
Controls,
Cheshire,
student projects in the past included the
microprocessor controlled growth chamb e r a n d 3 DOF mechanical manipulator.
~~~
[3] MEK
6800D2
Evaluation
Manual.
Motorola Corporation.
[4] R. Bishop,Basicmicroprocessorsand
the 6800, Hayden
Book
Company,
1979.
[SI Data
sheets
from
North American
CT.
References
R . L. Tummala,1980.Control
Systems
Lab
Manual.
Departnent
of
Electrical
Engineering
and
Systems
Service,
Michigan
State
University,
East Lansing, MI.
[2] D . C . Motors, Speed Controls, ServoSystems, AnEngineeringHandbook by
Electro-craft
Corporation,
Hopkins,
1978. MN.
Technology.
of Institute
Madras
ing from
[I]
February 1983
R. La1 Tummala
(S66-M70) was
born in Pamarru. India, on May 22.
1944. He received
the B.Sc. degree in
mathematics,
a pn hd y s i c s ,
chemistryfromAnd h rUa n i v e r s i t y .
Naltair.
India.
the
D.M.I.T.degree
in
electronicscngineer-
25