Photo 5. The robot’s electronic subsystems are easily
identified. For instance, the electronic compass area is
outlined by the pair of large SEN-L inductive sensors which
are mounted around the three-axis IC.
can be controlled remotely.
Before we build up the robot hardware, let’s log some
flight time with the robot’s electronic parts and pieces, and
the C compiler built-in functions and library routines that
The CCS C Compiler
However, you can easily integrate Microchip’s MPLAB
IDE and hardware tool chain into the mix. Microchip
programmers and debuggers such as the ICD2, ICD3,
and REAL ICE are easily integrated into the CCS C
The compiler’s built-in functions and libraries, along
with the device source code library take much of the
complexity out of assembling a C program project. Let’s
take a look at how these coding tools support the robot
hardware in the Robotics Development Kit.
The kit’s PIC16F877A-based robot controller is shown
in Photo 5. The PIC sits at center mass of the PCB. The
compass area is easily recognized as the PNI-11096 IC is
surrounded on two sides by the relatively large SEN-L
magneto-inductive sensors. The Winbond WTS701 speech
module is located on the opposite side of the PIC16F877A.
The large object near the power toggle switch that is
hanging off the edge of the PCB is a speaker/transducer.
The GP1UW IR detector is nestled in the forest of male
headers that feed the servos and GP2D120X/QRB1134
Sensor and servo connector details can be found in the
If you’re in the market for a C
compiler that is dedicated to the PIC
microcontroller, this is it. The CCS
C compiler’s 307 built-in functions
eliminate much of the bit twiddling
that one would normally perform to
configure a PIC’s internal subsystems.
The built-in functions operate with all
of the PIC families from the tiny PIC10
series to the dsPIC line.
A collection of built-in libraries
complement the compiler’s array of
built-in functions. The libraries support
RS-232 I/O, I2C, standard I/O, and
precision delays. Formatted PRINTF()
functionality is also supported by the
compiler. Device-specific drivers for
external electronic modules are also an
integral part of the compiler. Source
code drivers for LCD modules, EEPROM,
real time clocks, external analog-to-digital (A-to-D) converters, digital
potentiometers, and temperature
sensors are placed at the programmer’s
The CCS compiler has its own IDE,
programmer application, and debugger.
Figure 1. This illustration of the robot controller printed circuit board provides
the low-down on the IR sensor connections and breaks down the
14-pin female header pin assignments.
40 SERVO 09.2009