Development tools for PIC Microcontroller Systems: HI-TECH

Programming MICROCHIP PIC® microcontrollers is an easy 3 steps process:

  1. writing the code
  2. compiling/debugging the code
  3. uploading the code to the microcontroller

Development tolls and cycle
Figure: Development tools and cycle.


The software and hardware components:

Different tools involved in the microcontroller development cycle. To begin programming and building PIC microcontroller based projects you will need:


HI-TECH C compiler

HI-TECH Software is a world class provider of development tools for embedded systems, offering compilers featuring Omniscient Code Generation™, whole-program compilation technology, and an Eclipse-based IDE (HI-TIDE™) for 8-, 16-, and 32-bit microcontroller and DSC chip architectures.

NEW freeware compilers supporting Microchip PICmicro® devices. HI-TECH C® PRO compilers include Lite mode - a significant feature sure to impress the students and hobbyists. Lite mode is a FREE download, has NO memory or time restrictions and supports ALL devices. However, the OCG optimizations are disengaged.

  • HI-TECH C Compiler for PIC10/12/16 MCUs (Lite mode)
  • HI-TECH C Compiler for PIC18 MCUs (Lite mode)
  • HI-TECH C Compiler for PIC32 MCUs (Lite mode)

HI-TECH Software has provided this freeware HI-TECH PICC-Lite compiler as a tool for hobbyists and students, but the licence allows its use for commercial purposes as well. It is ideal as a teaching tool for an introduction into the 'C' language and embedded programing on a Microchip device. The selected processors were chosen for this compiler due to their popularity.

The HI-TECH PICC-Lite compiler is a freeware version of industrial-strength HI-TECH PICC™ STD compiler available for Windows, Linux and Mac OS X. The HI-TECH PICC-Lite compiler is the same in every respect as the full HI-TECH PICC STD compiler, except that it has support for only a limited subset of processors, there are some limitations on the amount of memory that can be used and source code for the standard libraries is not provided. The supported processors and their limitations (if any). Due to program memory constraints, support for printing floating-point and long data types via printf family functions is not included.

source : http://www.htsoft.com

Download a free fully-functional 45 day evaluation or the new Freeware Lite Mode and use the tutorial in the HI-TECH User's Guide to explore how easy it is to create a project.

You can watch a quick video-tutorial on how to create, build and assemble your project in the following video

Writing Code using C language

The PIC microcontroller can be programmed in different languages. Use a higher level language – C language - to program microcontroller. Why C language? Because:

  • Ease to use relative to ASSEMBLY
  • Ease to manipulate I/O and memory
  • C “allows” ASSEMBLY language code to be embedded within it
  • The errors can be handled more easily
  • Its efficiency

Compiling, Linking, and Debugging the code

C compiler “translates” the source code into object code. In addition, the compiler will perform error and syntax checking. The object code is then linked with other object modules to form machine code (op-code “HEX-CODE”). After linking, the program can be run and test using debugger.

The debugger can display program variables, examine and modify the PIC microcontroller's on-chip registers, and it allows you to control program execution.
For example: pausing or stopping program, single-stepping execute of the code.