+ Reply to Thread
Results 1 to 11 of 11

Thread: C compiler

  1. #1
    leonel Newbie
    Join Date
    Feb 2005
    Location
    Portugal
    Posts
    118

    Default C compiler

    Hi.
    I have c code to pic18f458. Usually i "write" in basic, so i've PICbasic PRO compiler. I don't want to buy a C compiler such as CCS, only because just one C code.
    Do you know any good free c compiler to pic18f458?


  2. #2
    Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent
    Join Date
    Mar 2005
    Location
    Brisbane Australia
    Posts
    6,817

    Default

    Try Boost C

    Mike.

  3. #3
    namitha agarwal Newbie
    Join Date
    May 2006
    Posts
    4

    Default

    try out keil microvision software

  4. #4
    DanD Newbie
    Join Date
    Apr 2006
    Posts
    52

    Default

    microchip's C18 is free and fully functional for 3 months. after that it limits some optimization, but for most things its probably adequate.

  5. #5
    leonel Newbie
    Join Date
    Feb 2005
    Location
    Portugal
    Posts
    118

    Default

    I already made the download of microchip's C18. I'll try it, but i thing that some commands from ccs are incompatible in C18.

  6. #6
    BeeBop Excellent BeeBop Excellent BeeBop Excellent BeeBop Excellent BeeBop Excellent BeeBop Excellent
    Join Date
    Dec 2005
    Location
    Vancouver Canada
    Posts
    1,193

    Default

    Hi,
    Yes, some things may port easily from CCS to C18, but some of the built in functions could be quite difficult to port. CCS is protecting their interests, and hides what it does in these built-ins. Which code is giving you a hard time? Perhaps if you posted your code, you could get some help with it.
    Regards,
    Robert

  7. #7
    raedbenz Newbie
    Join Date
    Nov 2006
    Posts
    50

    Default

    mplab compiles p18 family with C language,,,

  8. #8
    phalanx Newbie
    Join Date
    Oct 2003
    Location
    New Hampshire, USA
    Posts
    321

    Default

    Quote Originally Posted by raedbenz
    mplab compiles p18 family with C language,,,
    Not quite. MPLAB is the development environment for Microchip products. C18 is the compiler for PIC18's and is not included with MPLAB.

  9. #9
    raedbenz Newbie
    Join Date
    Nov 2006
    Posts
    50

    Default

    if u open microchip --> project --> set language tools then choose microchip C18......

  10. #10
    phalanx Newbie
    Join Date
    Oct 2003
    Location
    New Hampshire, USA
    Posts
    321

    Default

    Quote Originally Posted by raedbenz
    if u open microchip --> project --> set language tools then choose microchip C18......
    Which will only work if you have installed C18 because it is not included with MPLAB.

  11. #11
    Oznog Excellent Oznog Excellent Oznog Excellent Oznog Excellent Oznog Excellent
    Join Date
    Apr 2004
    Location
    Austin, Tx
    Posts
    2,766

    Default

    Quote Originally Posted by BeeBop
    Hi,
    Yes, some things may port easily from CCS to C18, but some of the built in functions could be quite difficult to port. CCS is protecting their interests, and hides what it does in these built-ins. Which code is giving you a hard time? Perhaps if you posted your code, you could get some help with it.
    Regards,
    Robert
    CCS's reliance on "built-in" functions means you're not writing C really.
    C18 (aka MCC18) has libraries, they're not "built-in" per se. Many C programmers recommend against using such libraries or built-ins. As you noted, they aren't portable between compilers. Now you can't really even use a lib function for say setting up an ADC or PWM unless you read the PIC manual and understand how the ADC or PWM module works. If you didn't, you'd just be making guesses at what the lib function's fields were for.

    Once you've read the manual, it's not hard at all to just put in register writes to use the module. So, why use such function at all?

    AFAIK MCC18 libs are uncompiled C code, so you can snoop into them and see what they're doing. That will either allow you to understand what it does so you can use it appropriately, or make your own code that does what you need.
    I thought what I'd do was I'd pretend I was one of those deaf-mutes.

+ Reply to Thread

Tags for this Thread