There is a constant flow of debate over the use of C or Assembly to program microcontrollers. While it is true that C compilers may generate less efficient code from a quickly written line of C than a human working in hand coded / hand optimized assembly, in most cases, well written C compilers can come very close. In some cases, a C compiler can optimize code in a way that would be very difficult for a human, even surpassing well written human assembly when very complex constructs are involved. Byte Craft did an interesting test on one of thier C compilers^ where they verified that for every instruction in the processors instruction set, there is some C sequence that compiles into that single instruction. At least with that compiler, for every possible Assembly program there exists a C program that generates the same (if not less) code.
C17/C18 http://www.microchip.com/1010/pline/tools/picmicro/code/mplab18/index.htm The "official" Microchip versions of C. That link will most likely be wrong in a few days since Microchip apparently rearranges the web site on a weekly basis, but if you go to microchip.com and search for C18, you will find it.
Byte Craft http://www.bytecraft.com/ MPC (Microchip PIC Compiler). ByteCraft developed the first C compiler for the PIC and Microchip licensed that code as a start on MPLAB C although it has been developed seperatly since then. MPC goes for $1,750.00^ USD. There is a demo version, but I have no information on the limitations.
Hi-Tech http://www.htsoft.com/ FREE! PICC-Lite is essentially the same as our full-featured, industrial grade PICC compiler, support is limited to the 16F877, 16F877A, 12F675, 12F629, 16F627, 16C84, 16F84 and 16F84A devices. MPLAB compatible. In March 2009, Microchip aquired Hi-Tech and will narrow thier focus to Microchip products.
C2C http://www.geocities.com/SiliconValley/Network/3656/c2c/c.html C-compiler runs on Win-95, DOS and Linux and compiles for PIC and SX
CC5X http://www.bknd.com/ optomizing C-compiler (free limited version, up to 1 kB, integrates with MPLAB?) all 14- and 12-bit PIC
CCS http://ccsinfo.com/ C-Compiler (usefull examples can be downloaded) James Newton says: "Based on (clumsy) link spamming, shoddy support for the SX (PIC clone) and bad personal experiences, I do NOT recommend this compiler. Your milage may vary."
Wiz-C http://www.fored.co.uk 70 to 100 pounds UK. Grew from: PicC http://members.aol.com/piccompile/products.htm C-Compiler $59, source level debugger $79. ?
pico-C http://personal.eunet.fi/pp/jokinen/ produces assembler code (free)
Visual C http://home.t-online.de/home/Swen.Gosch/epic.htm free demo
SDCC the Small Device C Compiler
Several people have started developing IDEs to connect to SDCC.
Small-C for the PIC'84 http://http://www.gnupic.org/compile/pic_cc.zip John Favata's modification of Small-C for the PIC '84 that generates Parallax SPASM assembly code.
http://ejames2.freeyellow.com/GGC.htm A free beta release of a new PIC18Cxxx compiler
PIC C compiler from Microchip has disappeared. I do not find it any where. Also C17 compiler doesn't support PIC16 CPUs. Is that correct. I got error message for 16F628 and other CPUs. Is there any solution. Is Microchip C compiler is available for download.
Ned T Konz of MetaMagix Says:
The PIC C compiler from Microchip has hardly disappeared. They just don't have any support for the 12-bit and 14-bit parts.+
But you can get demos of the C17 and C18 compilers. The C18 especially bears looking at; it produces good code and is reasonably ANSI compatible.
http://www.microchipc.com/ Shane Tolmie+
hosts a discussion forum for people who program Microchip PIC micros with C. He mostly uses Hi-Tech C, but seems open to other C compilers.
C2C with SourceBoost has an excellent PIC16xxx simulator with it, which requires no additional hardware, AND has 'plug-in' simulated hardware (like LED's, buttons, even an 8-bit logic analyzer).+
You should be aware that C2C is a subset of Ansi C, with 8 and 16-bit unsigned math only. However, the assembly output is very easy to follow.
The CCS-C compiler is Ansi-C with extensions for the PIC. However, it's source-level debugger requires attached PIC hardware to work.
|file: /Techref/microchip/language/cs.htm, 11KB, , updated: 2014/12/19 10:33, local time: 2015/8/1 13:25,
|©2015 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?|
<A HREF="http://www.piclist.com/techref/microchip/language/cs.htm"> PIC Micro Controller C/C++ Languages</A>
|Did you find what you needed?|
PICList 2015 contributors:
o List host: MIT, Site host massmind.org, Top posters @20150801 RussellMc, IVP, Bob Blick, James Cameron, alan.b.pearce, Dwayne Reid, embedded systems, John Gardner, Josh Koffman, Neil,
* Page Editors: James Newton, David Cary, and YOU!
* Roman Black of Black Robotics donates from sales of Linistep stepper controller kits.
* Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters.
* Monthly Subscribers: Gregg Rew. on-going support is MOST appreciated!
* Contributors: Richard Seriani, Sr.
Welcome to www.piclist.com!