Recommendation for C compiler for PIC uController??

Status
Not open for further replies.
Guys,

I have PIC 16F877A, and would like to program it. I thought of using directly the assembler codes in the beginning, but with 3 toddlers in the house, it is impossible that I write the program with assembler code.

Can you recommend me a C compiler for PIC uController with libraries for Hitachi LCD display, which is not too expensive? I'm looking for a compiler with a price of less than US$100.
 
It's probably not want you want to hear, but the Atmel AVR series of microcontrollers has a free compiler. For Windows, there is WinAVR or AVRGCC on Linux. The Arduino, compatible with Linux, Windows and Mac is possibly the best platform on which to begin, which uses the ATMEGA328P amongst others. Its USB interface allows you to program/reprogram the module and the cost is minimal. There is a library for just about every add-on you can imagine (LCDs, keyboards, sensors, etc.) and very good online support. When you're comfortable with programming on the Arduino platform, there are further options available allowing programming devices directly. See AvrFreaks | Atmel Community.
 
doesn't uChip have a free version - looks like it in their lit - no limits, just lower optimization level

and you can activate "Pro" level for a 60 day period - including after making the project work at the free level


but I've only ever coded PIC in asy - quite practical for few hundred lines - the uC C compilers often have as many nonstandard C idiosyncrasies that you may as well program in asy
 
Last edited:
I have used Microchip C18 compiler for C (aka MCC18). EDIT: the compiler is completely free, C18 comes in several versions, evaluation, student, full version. It comes with MikroC compiler and Assy compiler (I don't like MikroC, and I use the free MCC18 C compiler)

There are free versions of the software, with some small limitations om operation.

You do however,need a programmer to 'flash' the uC.

RS Components sell the full software and ICD3 programmer for around £100 GBP.

Worth every penny.
 
Last edited:
Ok thx for the suggestion.
I have already the hardware uC PIC implemented, so I can't use Arduino. I'll check the MCC18. I hope it comes with libraries for Hitachi LCD...

It's really simple enough to create your own LCD interface library, if necessary. If you're talking about alphanumeric LCDs, there is some useful information here:
https://exploreembedded.com/wiki/PIC_C_Library#Lcd_4_bit_Mode

Just examine the specific LCD's datasheet for timing.
 
I have to agree that Microchip already has all of the tools you will ever need for Free although it does cost for their optimized versions using C.

IMHO using a PICkit3 or building a PICkit2 and using Microchips software is the best way to go for full support of their products.

MPLAB®X IDE | Microchip Technology Inc.

You may be able to use their C compilers with their fullest optimization for 60 days is offered if you have never done so yet.

For the 8 bit stuff I typically stick with Assembly myself, but when it comes to the PIC24's and PIc32's then C I guess is a better way in the long run.

Mikoelctronika has some nice packages as well, but even they are a bit costly at $299 per version.
They do have a free trial period as well, but not as long as what Microchip offers.
However after the time period is up you can still uses their compilers for coding of up to 2K of program space.

Compilers - MikroElektronika

However they are a great source for Software libraries for some of the clicker board packages as most of them are open source as well.

A lot of stuff can be found here already at Lib Sock,

LibStock - Code Categories

You can find tons of stuff on how to go about using LCD's and such by just doing a Google Search on the HD44780 or even just the PIC16F877.

https://www.google.com/search?num=1....4.0....0...1c.1.64.serp..0.4.366.OLOotW-qPhw


https://www.google.com/search?num=1....0....0...1c.1.64.serp..0.18.1500.wmMnXaZOkXE


Some really cool stuff using the PIC32's can be found here and has the support already built in the MicroMite Basic,

http://geoffg.net/

Here is the 28 pdip PIC32 Micro Mite,

http://geoffg.net/micromite.html

Here is the forum were you can find all kinds of support for the Micro Mite Basic and up to date PIC32's and many other MCU projects,

http://www.thebackshed.com/forum/forum_topics.asp?FID=16

FWIW

jer 🙂
 
Last edited:
Status
Not open for further replies.