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

0 Members and 1 Guest are viewing this topic.

Offline ParthTopic starter

  • Full Member
  • ***
  • Posts: 71
  • Helpful? 0
PIC16F877 Free C Compilers
« on: June 10, 2008, 09:55:00 PM »
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.
« Last Edit: June 11, 2008, 11:42:55 AM by Parth »

Offline paulstreats

  • Supreme Robot
  • *****
  • Posts: 1,381
  • Helpful? 21
Re: PIC16F877 Free C Compilers
« Reply #1 on: June 11, 2008, 04:16:20 AM »
I think the free edition at www.htsoft.com covers the 16f877 but it is limited in how much memory/ program lines you can use. It will get you started tho.......

Also the follwing site will help you start programming assembly on a PIC   http://www.mstracey.btinternet.co.uk/pictutorial/picmain.htm
« Last Edit: June 11, 2008, 04:20:25 AM by paulstreats »

Offline ParthTopic starter

  • Full Member
  • ***
  • Posts: 71
  • Helpful? 0
Re: PIC16F877 Free C Compilers
« Reply #2 on: June 11, 2008, 11:03:34 AM »
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!
« Last Edit: June 11, 2008, 11:15:49 AM by Parth »

Offline ParthTopic starter

  • Full Member
  • ***
  • Posts: 71
  • Helpful? 0
Re: PIC16F877 Free C Compilers
« Reply #3 on: June 11, 2008, 11:26:22 AM »
On a side note:

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!

EDIT:

I also found this free C compiler for PIC. http://www.mikroe.com/en/compilers/mikroc/pic/ Has anybody used this or know if it's good? Thanks!

While searching, I found this free C compiler for PIC. Its limitations are only 2k to program, but I don't really know what that means and I doubt I'll use up a lot of memory. http://microchip.htsoft.com/products/compilers/PICClite.php
« Last Edit: June 11, 2008, 12:02:19 PM by Parth »

Offline alessio136

  • Jr. Member
  • **
  • Posts: 39
  • Helpful? 0
Re: PIC16F877 Free C Compilers
« Reply #4 on: June 11, 2008, 12:29:14 PM »
Someone told me that free C compiler for PIC do not exist.

I use PIC C Compiler and I am quite satisfied. No, it is not free.

Offline paulstreats

  • Supreme Robot
  • *****
  • Posts: 1,381
  • Helpful? 21
Re: PIC16F877 Free C Compilers
« Reply #5 on: June 11, 2008, 05:43:19 PM »
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

Offline dolinay

  • Contest Winner
  • Jr. Member
  • ****
  • Posts: 18
  • Helpful? 0
Re: PIC16F877 Free C Compilers
« Reply #6 on: June 12, 2008, 12:49:01 AM »
Look at HI-TECH PICC-Lite compiler. It seems the latest version - 9.60PL2 added support for many controllers, including 16F877. I just tried to
 
http://microchip.htsoft.com/products/compilers/PICClite.php

I think it's limited to 2 kB of generated code but if you're just learning to program in C, it will be long before you reach this limit.

Offline pomprocker

  • Supreme Robot
  • *****
  • Posts: 1,430
  • Helpful? 16
  • Sorry miss, I was giving myself an oil-job.
Re: PIC16F877 Free C Compilers
« Reply #7 on: June 12, 2008, 11:12:33 AM »
theres probably some swedish swashbucklers (pirates) that have it. not that I endorse that.

Offline ParthTopic starter

  • Full Member
  • ***
  • Posts: 71
  • Helpful? 0
Re: PIC16F877 Free C Compilers
« Reply #8 on: June 12, 2008, 12:05:12 PM »
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?

Again, thanks for the help everybody!

Offline paulstreats

  • Supreme Robot
  • *****
  • Posts: 1,381
  • Helpful? 21
Re: PIC16F877 Free C Compilers
« Reply #9 on: June 12, 2008, 02:49:35 PM »
If you are using the cerebellum board, it will come with a boot loader. You need a program on your pc to transfer your code to it. This program will instruct the bootloader erase whats already on it.

Even without a bootloader, this is included with most of the uploading softwares. (most that i have used auto erase it before they reprogram it)

Offline ParthTopic starter

  • Full Member
  • ***
  • Posts: 71
  • Helpful? 0
Re: PIC16F877 Free C Compilers
« Reply #10 on: June 12, 2008, 04:09:20 PM »
Thanks! Yeah, I am going to use an older version of the cerebellum, and it has an uploader built in.

So, this solves all of my questions! (As of now  :P) Again, thanks for all your help everybody!

Offline airman00

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,653
  • Helpful? 21
  • narobo.com
Re: PIC16F877 Free C Compilers
« Reply #11 on: June 12, 2008, 06:31:05 PM »
a bit late in the discussion but DONT USE ASSEMBLY!!!

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.
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline ParthTopic starter

  • Full Member
  • ***
  • Posts: 71
  • Helpful? 0
Re: PIC16F877 Free C Compilers
« Reply #12 on: June 13, 2008, 10:21:59 AM »
OK, I have one last question! For the PIC16F877, could I use the PonyProg 2000? It says it supports the PIC16F877, but I just wanted to be sure.

Or, could I use this programmer with this software?

Programmer:
http://www.sparkfun.com/commerce/product_info.php?products_id=9#

Software:
http://www.ic-prog.com/

EDIT:
Nevermind, please ignore this message as of now.
« Last Edit: June 13, 2008, 02:01:24 PM by Parth »

Offline alessio136

  • Jr. Member
  • **
  • Posts: 39
  • Helpful? 0
Re: PIC16F877 Free C Compilers
« Reply #13 on: June 13, 2008, 12:23:45 PM »
I have the PickIt 2 programmer and it works very very well.

It costs around $50 but it works via USB.

Offline pwdixon

  • Beginner
  • *
  • Posts: 3
  • Helpful? 1
Re: PIC16F877 Free C Compilers
« Reply #14 on: August 11, 2010, 08:25:23 AM »

I also found this free C compiler for PIC. http://www.mikroe.com/en/compilers/mikroc/pic/ Has anybody used this or know if it's good? Thanks!



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

 


Get Your Ad Here