Oops. I made a mistake. I have done my best to correct it. HI-TECH isn’t that bad of a free compiler. I’m going to do my best to showcase it by showing what you can do with it and how you can do it. The first source file is to turn on PORTC5 (Pin 5) of the PIC16F690.
Here are the last posts that mentioned HI-TECH.
Lately, I have had my eyes opened some in the microcontroller field. C compilers for Microchip: HI-TECH or CCS? Free or pay?
The article pretty much blasts Hi-Tech for being expensive and for creating code that is less than optimal. I really had a “come to Jesus” moment recently when I realized that not everyone wants to pay $150 or $200 dollars for a compiler. This is especially true if the hobby is planned to be short lived.
I did a little research to find the compiler listing for Microchip. Both MPLAB C and HI-TECH have lite versions for programming Microchip’s microcontrollers. Microchip C Compilers…HI-TECH User Manual…There are several MPLAB C user Manuals depending on the chip structure.
The Pickit 3 programmer is less than $50 usd. You don’t even need special programmer hardware since you can build a header in your circuit to program any chip. The PDF user’s manual describes how to program the ICs. See page 24. Pickit3 User Guide
I have had to learn C for Freescale microcontrollers for school. I can’t say that using Freescale is easy, but I have enjoyed learning. I had to buy this book for school, and it has helped some. The downside is the price. The HCS12/ 9S12 by Han-Way Huang
Freescale has offered a great compiler for free. The other cool thing about Codewarrior is that it is supported in Linux (IDE!!!). Codewarrior…Codewarrior specs
I could not find a tutorial or user manual for Codewarrior, but I can tell you that programming Freescale is a labor intensive process that involves an intimate involvement with the register names. Example, in CCS, to make an output high you simply say ‘output_high(PIN_A1);’. This is not the case for Freescale. ‘DDRA=0×01; PORTA=0×01;’. DDRA sets the direction of port a, pin 0 as output. PORTA sets that pin high.
I hope that this information is helpful. 2.5 years ago when I wrote the original article about Hi-tech and CCS, I was looking for a “get rich quick” scheme to programming in C. I found the book and used the compiler from that book. Yes, I have gained much knowledge from it, but now I share with you that the same can be done with any of these products for less money. The code may not be optimised with the lite versions and there may be some tiny limitations, but for beginners that isn’t going to make a difference. Even for the more advanced users, these limitations are not that bad.
(2-9-12) I edited this to try and correct some erroneous statements. To see my HI-TECH tutorials, check here -> http://tech-tut.com/hitech
This is now a touchy subject for me. I started reading a book Programming 8-bit PIC Microcontrollers in C…by Martin P. Bates in August. It explains how to write C for MCUs, and I feel that the book does a great job at it. The book focuses on the CCS compiler from CCSINFO.com. You might have read about the cost of this compiler in the big Microcontrollers blog www.tech-tut.com/?p=258. It is $150.00 for the mid-range MCUs. Ok. Keep this in mind. Here’s my story.