Society of Robots - Robot Forum

Software => Software => Topic started by: Tomomastchi-project on October 06, 2008, 01:50:11 PM

Title: Programming a PIC 18F4550 uC in C
Post by: Tomomastchi-project on October 06, 2008, 01:50:11 PM
Hi guys,

Could anyone maybe tell me how/where I can learn to program the 18F4550 uC using microchips compiler or any other free compiler?

Thanks
Title: Re: Programming a PIC 18F4550 uC in C
Post by: ArcMan on October 06, 2008, 02:43:25 PM
I would suggest studying the chip's data sheet and the compiler reference manual at microchip.com.  There are also many good PIC project books out there that use C as the programming language.

You may want to consider the CCS C compiler.

Title: Re: Programming a PIC 18F4550 uC in C
Post by: Rebelgium on October 07, 2008, 04:50:19 AM
you can use the C18 compiler student edition for free for 60 days.
I recommend starting with PIC16F though, and get a good book.

Don't start if you aren't determined though, it'll be abig waste of time ...no offense

Good luck! :)
Title: Re: Programming a PIC 18F4550 uC in C
Post by: paulstreats on October 07, 2008, 12:59:29 PM
The C18 compiler works fine after 60 days. You just lose high level optimizations, other than this there is no difference. (you are unlikely to use higher level optimizations). You can also use the free student edition to develope commercial applications with no other licenses.
Title: Re: Programming a PIC 18F4550 uC in C
Post by: ArcMan on October 07, 2008, 05:35:19 PM
Can you program any 18F chip with the free C18 compiler (without optimizations)?
Title: Re: Programming a PIC 18F4550 uC in C
Post by: paulstreats on October 07, 2008, 06:06:14 PM
yes you can

EDIT----------------------
Quote
I recommend starting with PIC16F though, and get a good book.

I dont want to sound argumentative but from my opinion the PIC16F range are outdated. They were never designed for c programming and have a reduced instruction set (they were produced at the time when assembly was the leading embedded language). The PIC18 range is basically the same as the PIC16 range apart from an expanded instruction set which makes them easier to work with for c compilers. (Im pretty sure that any PIC16 has a pin to pin and language compatable PIC18).

Getting a book is probably the best thing you can do though.... Its not fully relevant but I do some java programming work occasionally (when its going :) ) and i can tell you that even though ive been into java since its first launch, id be lost without my reference manual!
Title: Re: Programming a PIC 18F4550 uC in C
Post by: ArcMan on October 07, 2008, 08:46:20 PM
Hey now...  I love my PIC 16F's

and my 1972 Chevy Nova.

OK.  I don't really have a Nova.
Title: Re: Programming a PIC 18F4550 uC in C
Post by: paulstreats on October 08, 2008, 11:14:58 AM
The 18F's are also programmable with a jdm style programmer (that you can build yourself for less then $2).

An advantage with the newer 18f series like the 18f4550 is their usb support meaning that you can communicate via usb or get a usb bootloader for easy program downloading
Title: Re: Programming a PIC 18F4550 uC in C
Post by: ArcMan on October 08, 2008, 05:07:10 PM
Cool.  I'll have to look into the 18F's.  My Olimex USB programmer already will handle the programming.