Help/suggest C Compiler for PIC18 series

Programmer, In-Circuit Debugger, PIC Start-Up Kit, Memory Interface...

Help/suggest C Compiler for PIC18 series

Postby henrjay » Sat Mar 09, 2013 1:08 am

There are same choices available in internet.
Hitech,C18, CSS, microc, SDCC(16 and 18 only)

Hitech and C18 both from Microchip
some of them commented C18's lite version has a lot of redundant code after compiled into assembly

CSS are more suitable for beginner(a lot of function built), but a lot bugs@@...

I am considered not beginner since I started my MicroC with 8051(Keil IDE).
Now i start to try PIC MicroC.

FYI, i did search from internet, some of info. was posted a long time ago and i think cant take it as reference.
henrjay
Freshie
 
Posts: 5
Joined: Sun Dec 02, 2012 7:53 pm

Re: Help/suggest C Compiler for PIC18 series

Postby robosang » Sat Mar 09, 2013 8:09 am

I am using C18 from Microchip previously.

It depends on your purpose, there must be pros and cons, else they cannot survive :)

Now, HITECH is under Microchip, and Microchip is coming out with X8 C Compiler which combine the compiler for PIC16 and PIC18, is in the progress, so there might be some bugs. But I like it because it support HITECH PIC18 and C18, also PIC16 in 1 compiler.

Yes, compiler from Microchip produce longer code, but there is no limitation on the program memory that you can use in lite mode. You can write code until the PIC's memory boundary.
robosang
Expert
 
Posts: 1239
Joined: Wed Jun 10, 2009 5:37 pm

Re: Help/suggest C Compiler for PIC18 series

Postby henrjay » Sat Mar 09, 2013 10:45 am

robosang WROTE:I am using C18 from Microchip previously.

It depends on your purpose, there must be pros and cons, else they cannot survive :)

Now, HITECH is under Microchip, and Microchip is coming out with X8 C Compiler which combine the compiler for PIC16 and PIC18, is in the progress, so there might be some bugs. But I like it because it support HITECH PIC18 and C18, also PIC16 in 1 compiler.

Yes, compiler from Microchip produce longer code, but there is no limitation on the program memory that you can use in lite mode. You can write code until the PIC's memory boundary.


Erm, you are right.
henrjay
Freshie
 
Posts: 5
Joined: Sun Dec 02, 2012 7:53 pm

Re: Help/suggest C Compiler for PIC18 series

Postby shahrul » Sat Mar 09, 2013 1:39 pm

I'm using Hi-Tech C for PIC16 and PIC18. I don't like build in library because like to use maximize the memory.
User avatar
shahrul
Professional
 
Posts: 812
Joined: Sat May 16, 2009 9:54 pm
Location: Selangor

Re: Help/suggest C Compiler for PIC18 series

Postby henrjay » Sun Mar 10, 2013 1:48 am

shahrul WROTE:I'm using Hi-Tech C for PIC16 and PIC18. I don't like build in library because like to use maximize the memory.



How about C18?
Btw, Actually i not really understand what are the different for those compiler,such as, library, built in function and so on

Since i am using Keil before(8051), we have to know every hardware I/O, every single name
LCD function need write you own and so on.

No matter what compiler you use, there is same ways to achieve the expected result right?( despite the redundant code)
Can you give example diff compiler such as why built in library can ease your job?
henrjay
Freshie
 
Posts: 5
Joined: Sun Dec 02, 2012 7:53 pm

Re: Help/suggest C Compiler for PIC18 series

Postby Brian Griffin » Mon Mar 11, 2013 12:38 pm

henrjay WROTE:There are same choices available in internet.
Hitech,C18, CSS, microc, SDCC(16 and 18 only)

Hitech and C18 both from Microchip
some of them commented C18's lite version has a lot of redundant code after compiled into assembly

CSS are more suitable for beginner(a lot of function built), but a lot bugs@@...

I am considered not beginner since I started my MicroC with 8051(Keil IDE).
Now i start to try PIC MicroC.

FYI, i did search from internet, some of info. was posted a long time ago and i think cant take it as reference.


There is not much bugs on the CCS compiler. They release the updates pretty quickly. I tested them a few rounds and they are pretty good. However, you need to pay for the updates ever one year, and the renewing of the annual license is not cheap.

The final versions of all the HiTech and C18 are lumped into the Microchip XC8. Since then, I've been using the XC8 a lot more.

I have two licensed compilers for MikroC (PIC, dsPIC) and the best thing about the compilers is the lifetime updates. However, the formatting in the text box is horrendeous and I have to realign my program code manually. The Microchip IDE one is even a thousand times better than the IDE provided by the MikroC. Other than that, the LCD libraries for the MikroC works pretty well, but they are not written to be called through interrupts. I didn't use some of the libraries provided like PWM because I normally use interrupts to couple with these peripherals. Therefore, I usually write a majority of my own code.

Talking about the PIC32, I didn't purchase the MikroC one. Reason is simple: the XC32's libraries did a lot more (like SDCard and USB) than the MikroC one. Plus, FreeRTOS is not supported in that compiler, so it gives me one more reason to skip that compiler.

If you need speed, you need to write assembly inside the C compiler. Assembly in dsPIC/PIC24 and AVR is much easier compared to the ones in PIC16/18F, and many projects written will have a combination of assembler and C inside.

Finally, no C compilers made are easy for begineers, no matter how much they give you the library. You need to read the datasheet, and the instruction set manual for the respective microcontroller.
PIC - UIC00B from Cytron (replacement for my broken PICKit 2), Pickit 3, MikroC for PIC
dsPIC - MikroC for dsPIC, mikromedia board (dsPIC33)
AVR - AVR Dragon
Parallax - Prop tool
User avatar
Brian Griffin
Enthusiast
 
Posts: 403
Joined: Mon Jan 17, 2011 9:36 am


Return to PIC Development Tool

Who is online

Users browsing this forum: No registered users and 3 guests