t
o
b
e
re
CCerebot
You have an excellent mechanical
mind. You can size bolts and screws
using only your eyes. You can
machine aluminum, steel, and
plastic without giving it a second
thought. You’re comfortable with
motors and everything that drives
them. However, when it comes
right down to it, you realize that
in a robotic world all of that pretty
mechanical work is danged near
useless without some smarts
behind it. So, you always find
yourself pulling out that trusty
old eight-bit microcontroller and
whipping up some intelligence for
that hallowed pile of nuts and bolts.
There will come a time when that eight-bit microcontroller just won’t cut the mustard. One day
soon, you’ll create your ultimate mechanical device which
will need a faster and smarter electronic engine. That day
is closer than you think and that smarter and faster
microcontroller is already waiting for you in the guise of a
Microchip PIC32MX. This month’s discussion will revolve
around a 32-bit PIC32MX-based tool that you will find
useful as both a learning tool and — when the time arrives
— a mechanical device/robot controller.
A 32-bit Beauty
The 100-pin PIC32MX460F512L that is smiling back at
you in Photo 1 contains 12 KB of Boot Flash memory, 512
KB of program memory, 32 KB of data memory, and an
OTG (On-The-Go)-capable USB engine. This PIC — which is
capable of being clocked at 80 MHz — sports the normal
By Fred Eady
collection of USARTS, SPI portals, timers, analog-to-digital
converter inputs, and general-purpose I/O.
The PIC32MX in Photo 1 is the air boss aboard a
Digilent Cerebot 32MX4 which is shown in Photo 2. The
Digilent Cerebot 32MX4 can be powered externally via
battery, wall wart, the USB debug port, or the USB device
port. The nine female connectors that ring the edge of the
Digilent Cerebot 32MX4 printed circuit board (PCB) are
intended as base camps for the multitude of Digilent Pmod
peripheral modules. A Digilent Pmod can take the form of
a switch, a button, a group of LEDs, an official RS-232
interface, a speaker, a joystick, an LCD, or memory module
just to name a few.
The Cerebot was designed with controlling things that
make things move in mind as it has a pit of pins dedicated
to attaching standard hobby servos. In addition, a serial
EEPROM and serial D/A converter are available on one of
the two available I2C busses. All of the aforementioned
weaponry falls under your control via the Microchip MPLAB
IDE and MPLAB C32 compiler for PIC32 microcontrollers,
both of which are included on the Cerebot CD-ROM.
Programming and debugging the PIC32MX460F512L is the
responsibility of the PIC32 Starter Kit functionality built into
the MPLAB IDE, coupled with the USB-empowered
PIC18LF4550 you see in Photo 3. The PIC18LF4550
contains the instructions that execute to enable the
PIC32MX460F512L programming and debugging
applications.
46 SERVO 12.2009