Lancaster Hunt Systems Ltd
Web site design, surrey
web site hosting

Review Of The CCS PIC C compiler


CCS produce a number of PIC related products including a range of C compilers:
PCB supports PIC16C5X
PCM supports PIC16C6X, 7X, 77X, 8X, 8XX & 9X
PCW supports both the above with a CCS specific IDE.
This review is specifically about the PCM compiler used in anger on a PIC16F877 project.

What Do You Get ?

A small package including a floppy disc and a manual.


We used the Microchip MPELAB IDE to edit and download programs to the target devices. So first make sure you have newish version, version 6 or better, of the MPE LAB IDE installed and working on the target system.
Then go to the CCS web site and download the MPE LAB Plugin. Next install the CCS compiler from floppy or CD then finally the MPELAB Plugin.
When you next fire up MPELAB the CCS compiler will be available in the toolsets menu for a new project.


Too many to mention them all. But some highlights are –
Some fancy footwork with the stack to allow many subroutine calls.
Loads of library routines for things like RS232 ports, ADCs, PWMs, in fact all the hardware bits of the supported PICs.
All the normal C lib stuff like printf.
Variable types include BIT and BYTE.
Interrupt handling library routines.
In line assembler code.
Loads of source code and examples for loads of different functions and interfaces.


When integrated into MPELAB the toolset is a joy, finish editing and a couple of clicks later the compiled code is on its way to the target device.
The provision of the hardware library routines means that you do not spend your time trying to debug hardware registers, just the logic of your code, you hit the floor running fast. This is a huge saving in time and energy.
If the ICD2 debugger is installed then the IDE is aware of breakpoints on C commands.

Minor Gripes

There are example start up files for all the supported device types, and it would be nice if one of these was chosen as a start place from the project start wizard. Finding them took a bit of digging around, as it wasn’t immediately obvious where they lived.
Some of the library functions, such as OUTPUT_HIGH and OUTPUT_LOW will not take variables as a parameter to a function. Work arounds are provided, but it is more messy than would at first appear necessary.
Double clocking to highlight or select a word sets the breakpoint. Very annoying at times.


I had huge reservations about how useful a C compiler could be for something as lowly as a 16F series PIC device. I was wrong. Anybody who is still messing around in assembler for the majority of the code is wasting their time.
There may be times when assembler code is really required, but the use of in line assembler will cover this eventuality. The time saving is enormous.
There are obviously games to be played with local and global variables in a devices with such limited resources, but these same restrictions apply to the assembler only route.
At a cost of around £100 this is top notch kit and put together with the ICD2 debugger forms a excellent PIC development system.

Useful links


Staines web hosting
Surrey web site
Web site design