Review of the Hi-Tech C compiler for Microchip PIC18x
Update on 10th November 2007 - tested the latest version of the Hi-Tech C compiler, v9.62. It produces code that is definitely smaller, and seems to be 100% backwards compatible.
The PICC18 compiler produces C code for the Microchip PIC18Fxxx series of micros. It is available from Hi-Tech C, www.htsoft.com.
I've been using PICC18 for the last 8 months. In this time, I have not had any problems that can directly be attributed to the compiler. This continues a good tradition of nice products from Hi-Tech C. Previously, having used PICC for the PIC16Fxxx microcontrollers, I had spent 4 years, with only a couple of problems that could be directly attributed to the compiler. All of these problems were fixed promptly.
PICC18 is currently in use in many commercial settings, with excellent success. I am a long time user of Microchip PIC micros - 5 years in fact. I tend to trust the Hi-Tech C crowd. They produce compilers for a number of other microcontrollers, which shows they have experience in the compiler area.
I would agree that Hi-Tech C is probably the best compiler on the market for the PIC micro. It produces tight, small, fast code. However, it doesnt come extremely cheaply - one must pay for quality. I would recommend Hi-Tech C for any company. For a small-time hobbyist, I would suggest the free demo verison of Hi-Tech C for the 16F84.
You can read my
experiences in setting up and using the PICC18 compiler.
Cons of Hi-Tech PICC18
Hi-Tech C for the PIC18X
microcontrollers is available for $US850 from www.htsoft.com.
Cross-grades are cheaper. A PICC18
demo version is available for evaluation from the PICC18
"How I upgraded my C code from the PIC16877 to the PIC18452 microcontroller"
Heres a story told to me by another embedded C developer, explaining his experiences upgrading from the 16F877 to the PIC18F452:
"We have a design based on the PIC16F877 microcontroller. It is written in Hi-Tech C, with the aim of monitoring a large amount of data flowing from a number of sensors. We had run out of room on this micro, 8K was not enough for our needs. When the PIC18F452 was released by Microchip, we decided to upgrade. These new chips are pin compatible with the 16F876, and have double the memory (16kwords), and double the maximum speed (40Mhz).
We got hold of the PICC18 compiler from Hi-Tech C, which can compile for the PIC18F452. At first, when we ran it through the compiler, it gave some errors. However, with a few minor tweaks, we had it compiling under the new architecture. We programmed the new chip up, plugged it into the chip holder, and to our satisfaction it worked beautifully. We didn't even need to do a board revision! Time taken for the upgrade: 2 hours.
The new chip has a number of more powerful features compared to the older 16F877 chips. It has multi-level interrupts, which are a real bonus when doing any interrupt service routines. We changed INT0 to make for a simpler interrupt service routine. This new code has been running flawlessly for a while now."
When you're upgrading 16Fxxx code to 18Fxxx code, here's what you have to change:
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!