Search this site (www.microchipC.com).



This site is non-profit. Ad revenue almost covers hosting costs.





CCS C Compiler for Microchip PIC micros

Your ad here

 

News

10th March 2016. Converted three more projects to GitHub.

9th March 2016. Tonight, shifted PIC16F87x bootloader to GitHub.

8th March 2016. I am slowly copying all of the source code to GitHub, so anyone can submit pull requests to improve the code. Tonight, I shifted RS232 serial port examples and the USB example for the PIC18F4550.

5th November 2024. Observed a lot of traffic from universities and educational institutions worldwide.

31st October 2024. Lots of site traffic from emerging markets, where microcontrollers that sell for fractions of a US dollar are popular.

16th March 2014. Added a link to SimpleRTOS, a multitasking OS. For more information, see the C sample source section on SimpleRTOS.

2nd July 2013. Added a link to www.embeddedrelated.com, an excellent resource for anything related to embedded programming.

31st February 2013. Fixed site for colors with Google Chrome.

16th July 2012. Added code for portable LCD driver.

3rd April 2011. Updated links.

18th July 2011. Added a link to an an Embedded PIC Programmer, a method of programming a PIC micro from an embedded Linux application.

26th January 2011. Added a link to datasheet zone, one of the best places on the web to download datasheets for integrated circuits.

22rd November 2010. Unfortunately, microchipfault.com had to be discontinued due to StackOverflow changing their business model.

23rd October 2010. Removed dead links. Thanks Isaac Rogers.

27th September 2010. The (admittedly small) advertising profits from this site are now supporting an orphan in Africa.

27th September 2010. New 18F4525 bootloader released.

18th August 2010. New 18Fx52 bootloader client written in Python, for Linux (or Mac).

19th May 2010. Check out the openPICUS wireless platform project.

12th March 2010. Updated source code.

24th February 2010. MicrochipFault.com is live. Note: Unfortunately, MicrochipFault.com had to be discontinued due to StackOverflow changing their business model.

10th January 2010. Updated website with review for Lupik compiler and The Dot Factory: An LCD Font and Image Generator.

22nd December 2009. Added links to free terminal program, RealTerm. Highly recommended.

28th September 2009. Added the ds30 Loader, a universal PIC bootloader that supports almost every PIC micro, including PIC18F, PIC24F, dsPIC30 and dsPIC33.

1st April 2009. Updated links to Portmon, one of the most amazing little utilities to monitor RS232 serial communications occurring in the background. Checked other links.

23rd February 2009. Updated the PIC18F4550 USB serial port to be compatible with Hi-Tech C v9.51PL3.

10th January 2009. The PIC18Fx bootloader source code is now freely downloadable.This source code was previously sold for a fee.

8th December 2008. Added the UVa Online Judge tutorial and MinGW tutorial.

10th November 2008. Added a link to www.datasheetdir.com. This website has thousands of datasheets, and is maintained by an engineer that has spent 3 years collecting datasheets as a service to the engineering community.

23rd July 2008. HI-TECH Software has released the new PRO ANSI C compiler for Microchip’s PIC32 MCU Family. Supports Omniscient Code Generation. For more details visit the PIC32 compiler product web page.

14th May 2008. Added InnoSetupAV v1.00, a sample installer script for any Windows based support programs for any embedded work.

13th May 2008. Fixed some broken links in the sourcecode page, unlocking some source code that wasn't previous accessible.

15th April 2008. Free HI-TECH Software PIC32 compiler: time limited offer. See Hi-Tech C compiler offer.

3rd April 2008. HI-TECH C® PRO released for the PIC10/12/16 MCU Family, with Omniscient Code Generation, supporting the PIC10/12/16 MCU Family.

Details, see the product forum post.

21st February 2008. Release Candidate Testing: HI-TECH Software’s PICC-18 PRO v9.62.

12th February 2008. Beta Release: HI-TECH C PRO for the PIC32 MCU Family. Nearly 50 volunteer testers will, effective week commencing 11 February, put the beta release of HI-TECH C PRO for the PIC32 MCU Family ANSI C compiler through its paces.

9th January 2008. Added tiny threads example project.

8th January 2008 . Added interrupt driven UART for PIC16x.

3rd January 2008. Added link to MiniBasic - includes a complete library of example peripheral source code in C, for PIC18, PIC24, PIC32.

30th November 2007. Updated PIC18F4550 example - a Virtual Comm Port (VCP) over USB.

7th November 2007. Microchip has released the PIC32, based on a MIPS core. The "PIC32 Linux challenge" has been laid down, to fit uClinux or Linux into a PIC micro.

22nd August 2007. Added PIC JoyStick I/O demonstration project.

22nd August 2007. Added PIC18LF4550 plus LCD plus temperature sensor sample project.

View older news.

11 Nov 1999 Uploaded first
version of this site to the web.

PIC Sample Code in C

Brief Site Map

PIC C Sample Code

A huge amount of PIC sample code in C, over 55 projects. Browse the PIC C sample code archive here.

Frequently Asked Questions for Hi-Tech C

Hi-Tech C Frequently Asked Questions with the 65 most commonly asked questions about Hi-Tech C.

ds30 Loader

Universal PIC bootloader for the PIC18F, PIC24F, PIC24H, dsPIC30F and dsPIC33F from Microchip. 100% open source. View the ds30 Loader.

16F876A or PIC16F877A bootloader

Download a program into your PIC micro, in-circuit, within seconds via a serial link. Browse to Shane Tolmies 16F87xA bootloader.

18F1320 bootloader

Download a program into your PIC micro, in-circuit, within seconds via a serial link. Browse to 18F1320 bootloader.

18Fx52 bootloader

Download a program into your PIC micro, in-circuit, within seconds via a serial link. Browse to Shane Tolmies 18Fx52 bootloader.

dsPIC bootloader

Download a program into your dsPIC, in-circuit, within seconds via a serial link. This bootloader has auto-baud rate detection, and works with any dsPIC via a configurable XML file. Browse to Ingenia dsPIC bootloader.

Featured Articles

  • Review of Lupik compiler, a new compiler for entry level PIC micros.
  • Review of CCS C, one of the compilers for the PIC micro.
  • Review of Hi-Tech C for PIC18x, one of the compilers for the PIC micro.
  • 18Fxxx tutorial with quick start, everything you need to get started on this platform.
  • Tool setup tips, optimization tips for C, and much more. A huge 7.6Mb .pdf file - highly recommended. Read.
  • How to have four PIC16F87x chips on one RS232 bus.
  • "How do I integrate MPLab and an editor such as UltraEdit?".
  • "How do I measure an unknown resistor without using an A/D port?".
  • "Why do I need a common ground point for mixed analogue/digital circuits?".
  • "If I had to condense 3 years of PIC micro experience into one page, what would I say?".
  • A technique thats resulted in development time shortened by 20% and bugs reduced by 10%. Read.
  • Discussion on the most technically superior way of compiling files under Hi-Tech C. Read.

18Fxxx Tutorial

Hello Shane,

Saw your bootloader page on Sunday, wired the max232 circuit Monday morning at 09:00 AM and had downloaded my first program into an 'F876 by 09:15!!! By the end of the day, I came to realize that this is by far one of the best time savers I've come across in the last 5 years!
Thanks for an extremely detailed description and once again, thank you for making Petr Kolomaznik's small and powerful bootloader available.

Fritz Braun Jr.
Melbourne, Fl USA
www.bellsouth.net

Everything you need to know to get started using the 18Fxxx micros with C. Optimization tips, tool setup, and more.

Hi-Tech C Speed Optimization

Optimizing your code for speed and small size in loops in Hi-Tech C. See Hi-Tech C speed optimization tips.

Reviews

"Thanks, you got me up and running quickly!"

- Sam Douglas.

Hi-Tech C Micellaneous

  • How to do simple but powerful multitasking with Hi-Tech C. With tutorial and source code.

  • How to increase your processing speed using the Intel Core i7 processor. Fly through everything you need to do on your PC, the processor will give you the ultimate performance that you need to perform all of your tasks.

  • How to use a serial link for debugging. See serial debugging.

C Links

"I found this site one of the most helpful on the net regarding C
development for the PIC family.
Many thanks to the people involved on it!"

- Eduardo Robles

About the Author


Hi,

I have invested literally thousands of hours in this site, for you, and I sincerely hope this archive saves you a lot of time and effort. To enable you to trust what I have written on this site, here is my experience:

  • 14 years of experience, 10 years of commercial programming in C/C++/C#/PHP/SQL/.NET.

  • 4 years doing an Electrical Engineering degree at Canterbury University, graduated with Honours.

  • 1 year of tutoring students for a stage 4 electrical engineering design course at university.

  • 8 years of commercial programming with PIC micros.

  • 2 years of commercial programming with ARM and embedded Linux.

  • 4 years of experience with 8086 assembly.

Regards,
Shane Tolmie (BEng. Elec. Hons.)
Email: support@microchipc.com



This site is non-profit. Ad revenue almost covers hosting costs.

We welcome any suggesions or comments! Send them to Shane Tolmie on support@microchipc.com. This site is a completely separate site to www.microchip.com, and is maintained independently of Microchip Ltd., manufacturers of the PIC micro. All code on this site is free for non-commercial use, unless stated otherwise. Commercial use normally free, however, it is prohibited without contacting support@microchipc.com for permission. All content on this site created by Shane Tolmie is copyrighted by Shane Tolmie 1999-2009. Click to advertise on this website - $29.90 for a banner ad which will reach 55,000 user sessions per month. One months free trial!