interfacing your own circuits to it is usually not allowed by
contest rules in VEX VRC contests. For instance, even
though rules specify that only VEX sensors and actuators
can be used in a contest, by knowing the internal details of
the PIC18F8520 (in this case) the contestant can take
advantage of using other PIC peripherals such as internal
PWM timers and remapping the five interrupt pins to be
used as a high speed digital I/O when programming
firmware using the C programming language. In order to
gain a better understanding of the Microchip PIC
architecture, you will need to reference the PIC18F8520
datasheets found at www.microchip.com.
Some Safety Stuff
When you are connecting your own external circuits to
the VEX microcontroller pins for the experiments in this
article, make sure you do not directly short the power pin
(middle pin) to the ground or signal pins. Otherwise, you
The VEX Inventor’s manual does an excellent job of describing
the various subsystems that make up a robot model or
animation prop including: a logic subsystem; a control
subsystem; and a structure subsystem. You can find it at
www.vexforum.com/wiki/index.php/Inventor%27s_Guide.
might cause the controller to reset or overheat, making it
thermally shut down or possibly even damage the VEX
controller. Do not try to drive high current devices including
two wire DC motors or light bulbs from the three wire
PWM motor outputs. If you do need to drive two wire
motors, consider purchasing the low cost VEX PWM
adapter cables sold by IFI. Use a voltmeter to test the circuit
if you have doubts about which ones are the power and
ground pins on the VEX. During my experimentation with
the VEX controller, I accidently made all these mistakes, but
have not damaged it — which is a testament to just how
durable it is. Whenever you are first testing a new circuit,
be sure to look for any of these problems, and watch the
controller’s behavior; even monitor its temperature (it
should be slightly warm but never hot!).
Let’s Use Some Logic
We will mainly be concerned with the VEX’s logic
subsystem. The front of the controller has three jacks that
look like RJ 11 telephone jacks in as one power socket; to
the right of the power socket is the power switch.
A VEX microcontroller provides a regulated 5 volt
power supply that can also be used for these experiments,
as long as the circuit power requirements do not exceed
the IFI specifications of + 5 volts, one amp maximum
FIGURE 1. This schematic shows how to wire a simple LED
circuit to the VEX microcontroller’s digital output pins.
SERVO 03.2010 49