Figure 1. Pinout for parallel port.
Parallel and Buddy Ports
Hardware ports allow an electronic device to send and
receive data. Such a feature enables devices such as PCs,
handheld GPS units, Palm Pilots, and some pocket calculators
to connect and communicate with hardware-like printers,
scanners, data acquisition systems, and cameras.
The 25-pin parallel port — often found on PC desktops
and laptops — is primarily used to attach printers to a
computer. In essence, this port features eight digital output
lines (Figure 1, pins 2 through 9), a STROBE (pin 1), and a
STATUS line (pins 10-13 and 15-17). This enables one to
conveniently transmit bytes of data through the parallel
Less known among computer hobbyists is the buddy
port, often found on R/C transmitters. This six-pin, DIN
receptacle connects two transmitters through a cable. Either
transmitter can then be used to control an R/C vehicle. This
device is often used for training; a novice handles one unit
while an instructor manipulates the other. This allows the
Public Declare Sub PortOut Lib “io.dll” (ByVal Port As
Integer, ByVal Value As Byte)
Public Declare Function PortIn Lib “io.dll” (ByVal Port
As Integer) As Byte
Global strobehi As Integer
Global strobelo As Integer
Global OutPutPort As Integer
instructor to take control of the R/C vehicle whenever the
novice needs help.
The buddy port can be used to pass information to the
transmitter and only requires a data line and ground wire, as
shown in Figure 2. With port pinout diagrams, one can
construct a PC-to-R/C cable that plugs into the parallel and
buddy ports. One can write a computer program to output
data from the PC parallel port to the R/C transmitter. The
output data would encode commands to, for example, move
the vehicle forward or turn.
PWM Signals and R/C Servos
Besides a cable and program, you need to construct a circuit that can generate pulse-width modulated signals, called
PWM. R/C servos operate using these precisely timed signals.
Whenever the pulse width is high (+ 5 volts) for 1.5
milliseconds, the servo will remain centered. Widths ranging
from 1.0 to 1.5 milliseconds and from 1.5 to 2.0 milliseconds
will rotate the servo clockwise or counter-clockwise,
respectively, as depicted in Figure 3.
Most R/C vehicles consist of two or more servos, each of
which requires a PWM signal. Figure 4 shows how multiple
PWM signals are grouped into a frame. The frame rate
dictates how often the signals are updated. The time
between frames is called the sync time. To generate precise
time signals, a microcontroller is used. Its role is to translate
user commands (like move forward) into PWM signals. The
PIC16F84 is a good choice because it is widely available,
affordable, and easy-to-use with a large user base.
The PIC16F84 Microcontroller
The Microchip PIC16F84 is a common microcontroller
and comes in an 18-pin DIP package with 13 of the pins
dedicated to digital I/O. The chip has a wide operating
voltage of 2-6 VDC, can process instructions at 2.5 MHz with
a 10 MHz clock, has an internal timer that can trigger an
interrupt, and can source up to 20 milliamps per pin.
The PC-to-R/C circuit that is presented in this article will
Figure 2. Buddy port wiring diagram.
74 SERVO 07.2004
Figure 3. P WM pulse.