Comparison of diferent 16F88 compilers

Thursday, 11 April 2013 Posted in Blog

Chosing the right compiler to use in the future can be a lot of work sometimes, especially for those who like to take time in this decisions.

Ive written a small code that flashes 4 LEDs sequencially using a PIC16F88 internal 4MHZ crystal, it jumps from LED to LED with half a second interval.Its simple and short.
With this I can compare both, code size and the final compiled file .hex for the PIC size, and take some conclusions.

This is the basic code in C :

                PORTA = 0b00001000;
                PORTA = 0b00000100;
                PORTA = 0b00000010;
                PORTA = 0b00000001;

The following picture shows the connections on a breadboard :


I tested 5 compilers, 3 C compilers, one assembly compiler from the manufacturer and a very sucessfull open source compiler JAL with its own syntax.

                                  Source                      Compiled

JAL                          783 bytes                  539 bytes

MikroC                     629 bytes                   600 bytes

Assembly                 1590 bytes                384 bytes

CCS                         400 bytes                  616 bytes

XC8                          857 bytes                 596 bytes

You can click the links above to download, sources and compiled files.

Source files are complete with right fuses and configurations for that compiler.

Here goes a video of the LED sequence :