Update on microcontrollers: Microchip and Freescale compilers (Hi-Tech, MPLAB C, Codewarrior)

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.

Microchip

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 CompilersHI-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

Freescale

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!!!). CodewarriorCodewarrior 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.

Conclusions:

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.

This entry was posted in Electronics and tagged , , , by robbie. Bookmark the permalink.

About robbie

I am an electronics enthusiest and a ham radio operator (W1RCP). I like to play with electronics. It's fun and educational. I looked forward to working in the engineering field in the future. I have a BS in Electronics Engineering Technology from DeVry University. I also have an Associate's degree in Marketing Management from Moultrie Tech, and a diploma in Electronics from MTC.

Comments are closed.