Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

What C compilier to use.

Status
Not open for further replies.

pixman

Member
Hi everyone.

I have started to learn C and I am using the book "C What Happens".
they use the CCS compiler and the PIC16F818. The best of it all is when you type the code
in, and compile it, it can not find the include file <16f818.h>.
When i looked for the include file i only found a handful of PICS.

I program i assembly, but it it time to move onto bigger things.
I got a Olimex PIC32-maxi-web board.
It has a PIC32MX795F512L chip on it with a touch screen.
I would like to start learning with PIC18F first (baby steps).

My question is:
What C compilier would you recommend.
HI-TECH C
MPLAB C

They are both free and run with MPLAB IDE.

Thanks.
 
I don't use C on 16F devices.
On 18F devices I use Microchip C18
On PIC24, dsPIC30, and dsPIC33 devices I use Microchip C30
On PIC32 devices I use Microchip C32

There is nothing wrong with HI-TECH C. It's a good compiler. I'm just used to the other ones.
 
Last edited:
Mostly because C on a 16F part is pretty inefficient since the core was never optimised to be used with a C compiler. On top of that, I really only use 16F, 12F, and 10F parts when I need a low pin count devices for a relatively simple application. Since the applications tend to be uncomplicated, it isn't difficult to code the entire program in assembly.

The 18F cores made a number of improvements that allow for improved C compiler efficiency. On the rare occasion that I still use an 18F part, I will use C for the higher level program organization but will code any time critical routines in assembly.

I pretty much stopped using 18F parts in favor of the newer 16-bit PIC24s and dsPICs.
 
Same here... Hitech gives to much overhead and I can't fork out oodles for C compilers for every chip... I get along fine with Oshonsoft for the smaller chips... It produces an asm file that you can optimize yourself... (not that you really need to, Vladimirs done a pretty good job)
 
For the simpler pics (16F down) I use the BoostC compiler and it seems pretty efficient.

Mike.
 
I used to always use assembly up to about 5 years ago. At that point the compilers had improved to the point where I felt that they were good enough that I didn't need to worry about efficiency anymore. I still use assembly for some time critical stuff.

Mike.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top