Issue
102 January 1999
The
PCL3013 Step/Servo Motor Controller in Action
BUILD
THE PROTOTYPE
Most
of the hardware for the prototype mounts to the wire-wrap
perf board but not my just-completed adapter board.
The wire-wrap pins on its metric grid dont match
the perf boards inch grid. A suitable hole has
to be made in the perf board and the adapter board glued
over the hole.
I
dont know when Ive taken on a project that
involved so much in the way of background work before
I could get to any of the fun stuff. By this time, I
was getting itchy to put this chip through a few of
its paces.
The
completed prototype is shown in Photo 1, and you see
the schematic in Figure 2. The elements in the schematic
are similar to other intelligent step motor controllers.
|

(Click
here to enlarge)
|
Photo
1The box header allows connection to the
HC11. The screw terminals on the right-hand
side are for the motor/encoder, and the screw
terminals at the bottom left are for the manual
pulser. Power for the motor is connected to the
binding posts at the top right corner.
|
A
clock source was required. In this case, I had an oscillator
can that was the correct frequency, so I used it. I
could have used a slower clock signal from the HC11
board.
I
chose a mature step-motor driver chip to keep the support
circuit simple. A reset circuit and some status LEDs
with a driver complete the schematic.
BUT
DOES IT WORK?
Usually,
theres a certain amount of pain associated with
getting any project working. Maybe its wiring
mistakes that have to be corrected or timing problems
that have to be dealt with. Or in some cases, a servo
amp wants to oscillate.
Amazingly,
none of that happened. I cant explain it. Maybe
Id already paid my pain quota with all the hassle
I had getting to this point.
The
monitor program Im using for the HC11 allows
reading and writing memory or I/O without generating
new code. This feature is useful when connecting a new
I/O device.
To
verify that communication with the PCL3013 is OK, I
first attempted a read of the status word. The data
contained in the read back of the status bytes appears
to be correct, given that I tied some signal lines high
that wouldnt be used. Thats a good sign.
A
write attempt is next. A general-purpose I/O pin is
told to be an output and then try writing it to 0 and
then to 1. That works. I try it with a different I/O
pin and that works, too. Im pretty confident now
that the data bus connection between the HC11
and the PCL3013 is functional.
INTERFACE
DETAILS
Its
common for a peripheral I/O device to have times when
its busy and wont read or write data. The
PCL3013 is similar in that you should wait 200 ns after
sending a read register command before letting the micro
try to read. The 813-ns micro bus cycle provides the
necessary time delay.
The
PCL3013 needs 16 bytes of I/O space, which is quite
a bit more than the I/O devices Ive worked with
until now. The I/O space on the development micro is
partitioned into 800h blocks, so the I/O space requirement
was not a problem.
The
device interfaces easily with Motorola and Intel micros:
there is an I/*M control line (read *M as the complement
of M). And, it supports 8- or 16-bit data buses: there
is a B/*W control line.