Author
Topic: PIC16F877 Free C Compilers (Read 21381 times)

Does anybody know any good decent, trustworthy C compilers that work for the PIC16F877 and are for free? I might also be willing to pay really low for a good one (under $30 about?).

I've googled for "PIC free c compiler" and "PIC 16 series free c compiler", but I only found compilers that were not very trustworthy or I was too afraid to download because they seemed too good (maybe they had a virus...).

So, if you guys know any that at least worked and would recommend to a beginner, I'd really appreciate if you posted. Thanks for your help, everybody!

EDIT: I'd like a C compiler because I don't know how to program in Assembly. Granted, I also don't know how to program in C, but there are many ways I know how to learn to. Also, I don't want to get overwhelmed while learning Assembly because I am a newbie and don't know much about programming.

Thanks, paulstreats. I can get the programmer, but I need trouble finding a cheap C compiler. Sure, there are demos, but what if those run out?

I have 2 other solutions to my problem: Does anybody know any Assembly tutorials that actually teach well (I googled but didn't find any good ones)? Or, does anybody have any source codes (in assembly) that they are willing to post? Thanks!

Your best bet is to move on to the PIC18 devices. These are optimized for C programming and are easier for people to make compilers for.

Microchip do a c18 compiler student edition for free. In fact i think they now do free student edition compilers(commercial use still allowed) for all but those under the 18 series. The problem with the PIC's below the 18 series is that they are relatively an old breed and when they were thought up, they were expected to be programmed by assembly and so the assembly command set is difficult for a C compiler to work with thats why they are all very limited compilers or cost more than most hobbyists can afford. P18's are usually pin to pin comatable with the P16's only they have an advanced command set allowed easier ways for c compilers to use them. (the only problem is if you are relying on a bootloader and dont have a hardware programmer to put your own on).

Quote

If I download a source code, do I just have to upload it to my PIC16F877, or do I have to compile it then upload it? Thanks!

It depends.

If you can download a .hex file then you can just upload it to the microcontroller. If it is just source code then it will need compiling

Thanks for the replies, you guys! I think I'll go with the PICC-Lite because it seems pretty good. Actually, it seems really good for being free!

Another question, though. How do I delete memory? For instance, let's say I uploaded some sort of line following code on my PIC. How do I delete that so I can upload another code that makes it avoid lines?

Its always good to learn it because it will give you a better understanding of how the C or BASIC code works, but dont use it for your language. I used it for about 3 months back when I was a major noob. I thought that all there was was assembly, boy was i wrong. But after assembly ,transitioning to C and BASIC was a breeze.

I use the MikroElektronika compilers a lot and they are good mostly because you get loads of libraries so you can get functionality really quickly. The compiler is free to download but limited in program size, on the plus side they are fairly cheap and when you buy it they provide unlimited upgrades forever (so far).