The HI-TECH C Compiler for PIC10/12/16 MCUs is a free-standing, optimizing ANSI C compiler that integrates into Microchip's MPLAB IDE and is compatible with all Microchip debuggers and emulators[^1^]. It implements the optimizations of Omniscient Code Generationâ (OCG) - a whole-program compilation technology that provides denser code and better performance for development on PIC10/12/16 MCUs[^2^].
In this article, we will review some of the features and benefits of using the HI-TECH C Compiler for PIC10/12/16 MCUs, as well as some of the limitations and drawbacks. We will also compare it with other C compilers for PIC microcontrollers, such as MPLAB XC8 and mikroC PRO for PIC.
Features and Benefits
Some of the features and benefits of using the HI-TECH C Compiler for PIC10/12/16 MCUs are:
It supports all PIC10/12/16 devices, including the latest ones such as PIC12F1840 and PIC16F1829.
It offers several optimization levels, from O0 (no optimization) to O9 (maximum optimization), as well as custom optimization options.
It generates compact and efficient code that can reduce code size by up to 50% compared to other compilers[^2^].
It supports standard C features such as bit fields, structures, unions, enums, typedefs, pointers, arrays, strings, etc.
It supports advanced C features such as inline assembly, interrupt handlers, function pointers, variable arguments, etc.
It supports C99 features such as boolean type, compound literals, designated initializers, etc.
It supports some C++ features such as function overloading, default arguments, const keyword, etc.
It provides a comprehensive library of functions and macros for common tasks such as math, string manipulation, EEPROM access, etc.
It provides a user-friendly interface that allows easy configuration of compiler options, project settings, device selection, etc.
It integrates seamlessly with MPLAB IDE and allows debugging and programming of PIC devices using Microchip tools such as PICkitâ 3, ICD 3, REAL ICEâ, etc.
Limitations and Drawbacks
Some of the limitations and drawbacks of using the HI-TECH C Compiler for PIC10/12/16 MCUs are:
It is not a free compiler. It requires a license key to activate it. The license key can be purchased from Microchip or authorized distributors. The price varies depending on the device family and the number of seats. For example, a single-seat license for PIC10/12/16 devices costs $495 USD[^3^].
It is not a cross-platform compiler. It only runs on Windows operating systems (XP/Vista/7/8/10). It does not support Linux or Mac OS X.
It does not support all C99 features. For example, it does not support variable-length arrays, flexible array members, complex numbers, etc.
It does not support all C++ features. For example, it does not support classes, inheritance, polymorphism, templates, exceptions, etc.
It does not support some PIC-specific features such as extended instruction set (EIS), peripheral pin select (PPS), configurable logic cell (CLC), etc.
It may generate some warnings or errors when compiling code written for other compilers. For example, it may complain about non-standard syntax or undefined symbols.
Comparison with Other Compilers
The HI-TECH C Compiler for PIC10/12/16 MCUs is one of the several C compilers available for PIC microcontrollers. Some of the other popular ones are:
MPLAB XC8: This is Microchip's own C compiler for 8-bit PIC devices. It supports all PIC10/12/16 devices as well 061ffe29dd