Switching from CCS C to a free compiler?

Discussion in 'Programmer's Corner' started by lowprofile, Jul 15, 2012.

  1. lowprofile

    Thread Starter Member

    Oct 31, 2011
    Dear All:

    I have learned how to program PICs with CCS C while in school. We were given what seems to be an old version of the software. I can use it to program the PIC16F877A, which is what I have mostly used.

    Now I want to program a 16F628A. My CCS C version does not support this and I would have to buy a modern version to legally get the header files (as far as I understand).

    If I have to, I will just buy a new version, but I would first ask some experienced people about their opinion. Is there a viable FREE C compiler that has features like the CCS C compiler, such as all the useful functions and libraries that come with CCS?

    I thought I remembered Microchip was planning to release a free compiler called C8 (i might have that wrong), but now I just see Hi-Tech listed.

    Should I give Hi-Tech a try? Will it be very different to CCS, or will the similarities be intuitive?

    Any additional information or advice you can offer me with regards to switching compilers would be very welcome.

    Thank you for reading. I look forward to any comments!
  2. MrChips


    Oct 2, 2009
    Give Hi-Tech C a try. It is free.
  3. takao21203

    Distinguished Member

    Apr 28, 2012
    XC8 is available as free edition. Used with MPLABX.
  4. JohnInTX


    Jun 26, 2012
    I agree. Since Microchip acquired HiTech efforts have been towards unification of C18 and the HiTech products. XC8 is the result. Support of the earlier compilers (adding new PICs, support for newer debuggers, PC operating systems etc.) will eventually wane as XC8 / MPLAB X picks up speed. You might as well get with the new stuff. Plus, XC8 supports ALL 8 bit PIC families. Most of the others don't.
  5. aprillove1719

    New Member

    Jul 17, 2012
    Two thumbs-up!!! thank you!:D
  6. John P

    AAC Fanatic!

    Oct 14, 2008
    It's actually pretty trivial to make the CCS compiler work with chips that it doesn't support. All you have to do is start with whichever chip your compiler will recognize that is similar to the one you want to use. Then look through the manual and find the memory locations that the compiler won't recognize, then add those to your program in the form of #define statements. Obviously you won't have CCS-style functions for whatever features those registers control, but I don't find that to be a problem. You could write macros so the code would look more consistent.

    I've also used the SourceBoost compiler. It's OK, but I'm used to CCS so it just doesn't feel right. There is a limit on program size for the free version, but they don't force you to accept a lower level of optimization.
  7. jwilk13


    Jun 15, 2011
    Like John P mentioned, I personally use the SourceBoost compiler. To be fair, it's all I've ever used, so I can't compare it to anything else. It works pretty well for everything I've used it for, and I've never run into any bugs (I've run into more bugs with MPLAB X and other Microchip software than with SourceBoost). Also, the SourceBoost developers are quite active on their forum, making it easy to get help if you need it.
  8. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    I've used the Sourceboost compiler inside MPLAB (non-X) as the IDE and it performed very well. The code worked very well, the only issue is compile errors cannot be clicked to jump to the errant line.