Independent Review of the CCS C compiler
I've been using the Customer Computer Services (CCS) compiler for a while now. In the next few minutes, you will get a good overview of what the CCS C compiler is capable of.
On thing I was taken with
is the C code wizard. Read on for why I fell in love with this feature ...
The CCS C compiler supports the Microchip PIC12x, PIC16x, PIC18x, and dsPIC devices.
The compiler is very close to being 100% ANSI compatible. It supports everything a PIC compiler needs. It also supports the necessary superset of ANSI C to work with embedded micros, such as fuse and interrupt level support.
The supplied IDE is nicely integrated into the compiler.
The IDE is very configurable. All the menus can be customised. The programming icon defaults to the WARP-13 programmer, this can be changed in the options.
Here is a screenshot of the IDE, showing its look and feel.
The Code Wizard can be used to generate perfect template C code, tailored to each individual PIC micro.
Wizard for RS232 and I2C support
Its easy to add RS232 serial port and I2C support to your project. Select the appropriate options in the wizard file, click 'Generate', and the code is inserted into your project.
Wizard for External Chips Support
As part of the code wizard,
one can add support for a variety of external chips. The currently supported
chips are the Dallas DS1302 real time clock, LTC1298 A/D convertor, LCD drivers,
EEPROM from 128bytes to 8kbytes, Philips PCF8570 serial RAM, and many more.
Wizard for Timers
One of the most datasheet-intensive
jobs is setting up timers. With the wizard, select the appropriate timer and
its frequency, and click 'Generate' for perfect C code to initialize the timer.
for Ports Setup
So far, I have mentioned 5 settings that the wizard sets up on the PIC micro. There are 6 more wizards, covering the rest of the peripherals on the particular PIC micro that you are working with.
The wizard is a good feature
of the compiler tools, and saves a lot of typing.
CCS C comes with a lot of sample code - 70 complete projects, demonstrating everything from an internet web dedicated servers to USB connection. Every peripheral that the PIC micro has is demonstrated, in code.
Here is a selection of the sample code that it arrives with:
Selecting "View>>Program Statistics" shows a list of interesting program statistics. There is even the stats stating the average number of instructions that each line of C compiles to.
Tools: Call Tree
Selecting the menu "View >> Call Tree" gives an list of the procedures called in the program. This is quite useful - on the 14-bit microcontrollers such as the PIC16F87x series, one must be careful not to have nested subroutines more than 12 calls deep.
Tools: File Comparison
Often, when programming, you'll need to compare versions of files to find out exactly what has changed. CCS includes a handy tool to make this conversion easier.Of course, this feature has always been included in Windows and DOS - use the DOS command "C:\>FC [file1] [file2]" for file compare. However, this requires an exit to DOS and typing a lengthy command line. The tools included with CCS C to compare files are much better.
Tools: Hex Convertor
A lot of embedded programming involves working with hexadecimal. CCS includes a neat little tool under the menu "Tools >> Numeric Convertor" to convert between decimal, hexadecimal, and float data types.
Tools: Valid Fuses
When programming a PIC chip, the fuse settings must be set. For example, if a 20Mhz crystal is used, the fuse must be set to 'HS'. To set "Code Protection from External Reads", the fuse must be set to 'PROTECT'. An sample line of C, included before main() is shown next.
#fuses HS,PROTECT //fuse settings
The IDE includes integrated support for a debugger. Attach 5 wires to your PIC micro, and then step through the C code on the target in real time.
I have found the technical support from CCS to be quick and accurate. Select "Help >> Technical Support", and your email software is started. For the last 2 enquiries that I sent, an auto-mailer responded instantly with a support ID code, followed by a email explaining what to do within 2 hours.
Advantages of CCS C
Disadvantages of CCS C
CCS have done a fine job on their compiler. If you are a hobbyist, or designing code in a commercial setting, then CCS C will be perfect for you.
This is an independent review, not affiliated with Custom Computer Services. The views expressed in this article expressly those of Shane Tolmie.
What do you think of this article? Send feedback to email@example.com, and I will include your comments, for the world to see, at the base of this article.
2008-04-08-1303 - Received email:
We welcome any suggesions or comments! Send them to Shane Tolmie on firstname.lastname@example.org. This site is a completely separate site to www.microchip.com, and is maintained independently of Microchip Ltd., manufacturers of the PIC micro. All code on this site is free for non-commercial use, unless stated otherwise. Commercial use normally free, however, it is prohibited without contacting email@example.com for permission. All content on this site created by Shane Tolmie is copyrighted by Shane Tolmie 1999-2009. Click to advertise on this website - $29.90 for a banner ad which will reach 55,000 user sessions per month. One months free trial!