Mlab vs mikroC

Discussion in 'Embedded Systems and Microcontrollers' started by carlcat, Aug 29, 2007.

  1. carlcat

    carlcat Thread Starter Member

    Joined:
    Aug 22, 2007
    Messages:
    14
    Location:
    VA
    I'm getting ready to purchase a PIC developemental board and can get a substantial discount on the compiler (MikroC) if I get the two together. I understand that Mlab is the standard for PIC programming and has a very comprhensive set of tools.....and it's also free. Having said that, is it worth paying for a compiler? Does anyone have experience with MikroC to where they can give me a reason to justify the purchase of MikroC ($180 at discount)? Thank you in advance for any help.
  2. Dave

    Dave Senior Member Staff Member

    Joined:
    Nov 17, 2003
    Messages:
    6,961
  3. nanovate

    nanovate Well-Known Member

    Joined:
    May 7, 2007
    Messages:
    665
    Location:
    USA
    MPLAB does not come with a free full functioned compiler AFAIK. MPLAB is a GUI frontend with a simulator and hooks for interfacing all of Microchip's dev tools. I'd recommend getting the compiler if you have the budget. MikroC is supposed to have a decent library.

    There are different flavors of PIC and each uses a different compiler. Microchip has "free" compilers for the PIC18 and PIC24/30 that turn off optimizations after the trial period ends. For the PIC12/16 you need a different compiler -- I do not know if there is a free compiler -- HiTech has a limited compiler -- restricts to a subset of devices which is fine if you only use those parts.

    I use MPLAB but I also have a full commercial compiler for all the PICs. If MikroC will compile all the PICs then I think it is worth it. If you plan on doing serious designs then you'd have to look at other things -- Microchip prefers to support MPLAB versus another vendors development environment. In any case try to get familiar with MPLAB in case you decide to buy Microchip hardware and Mikro doesn't support it.
  4. Dave

    Dave Senior Member Staff Member

    Joined:
    Nov 17, 2003
    Messages:
    6,961
    It is correct to say that the C18 compiler I linked to above is for the PIC18xxx line of microcontrollers. I too am not aware of one for different lines. You may wish to look at the relevant page at Microchip's website: http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2519&param=en025441

    As for the optimisation limitations of the C18 compiler, I have discussed this with n9352527 some time back and he brought to my attention that the main thing that the programmer will observe is an increase in memory requirements for a program - the net impact on the functionality of your programmes is limited, if not negligible.

    Dave
  5. carlcat

    carlcat Thread Starter Member

    Joined:
    Aug 22, 2007
    Messages:
    14
    Location:
    VA
    From what I read, MikroC covers PIC12/16 and 18. MikroC also uses high level language,so being the newbee that I am (I'm not too worried about code overhead and speed), I think I'm heading in that direction and I'll post back my critique from a beginner's propective as I will the Easy Pic 4 Developemental board as well. Let me know if you think I'm completely misguided. Thank you all once again for helpful input.
  6. Dave

    Dave Senior Member Staff Member

    Joined:
    Nov 17, 2003
    Messages:
    6,961
    As a curiosity can I ask the following questions:

    1) What is MikroC priced at without the discount?

    2) What reasons, if any, have the suppliers of your PIC dev kit given you to go for MikroC as opposed to another option? Is it just because they can do you a deal?

    Dave
  7. carlcat

    carlcat Thread Starter Member

    Joined:
    Aug 22, 2007
    Messages:
    14
    Location:
    VA
    forgive my mis-spell: Mplab. anyway the price without the discount is $249.00. It does seem to be geared to us newcomers in that it includes examples and a fairly good size library as I think Nanovate pointed out earlier. Here's where you can take a look:
    http://circuit-ed.com/mikroc/index.htm

    Plus the fact that it handles more than just pic18 (free version of Mplab). The whole package is probably overkill for a beginner but I also want to purchase something that will not be outgrown for years to come.
    Maybe it's my time to be the guinea pig and not let someone else bear the brunt.
    But having said that, I'm trying to research and get as much input as possible so I won't regret it later so thanks for the help and the questions.
  8. nanovate

    nanovate Well-Known Member

    Joined:
    May 7, 2007
    Messages:
    665
    Location:
    USA
    Just to clarify:
    MPLAB is not a compiler. It is an integrated development environment that can interface with third party compilers (an Microchips C18 and C30 compilers). Some of these third party compiler vendors offer free demo versions that are scaled down versions of their full versions. The scaling back might involve restricting supported devices or limiting the size of your output code or eliminating optimizations.

    Mikro C says it is ANSI C (with minor modifications) which is good because that means that it will more portable if you decide to use your code in another compiler. One note about that though, if you use the built in libraries without ever learning how they worked then you'll have tough time porting your code to another microcontroller/compiler. Of course you may love Mikro C and PIC so much that you'd never switch ;)

    Have fun!
  9. Dave

    Dave Senior Member Staff Member

    Joined:
    Nov 17, 2003
    Messages:
    6,961
    Ok, tying together your previous posts with this one, you are purchasing the Easy Pic 4 dev board presumably with the standard M/C on board (PIC16F877A). If you use the default set-up you cannot use the C18 or C30 compilers so will need to look at the alternatives suggested at Microchip: http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2519&param=en025441

    You should then compare these (features and price wise) against MikroC. One thing I will say is that MikroC is developed by the people supplying your dev board so there may be an advantage with hardware-software integration. You will only find this out by trying them out, but from what I can see you can't get a free trial of MikroC. One thing to be aware of is that the discount price ($175 on the website) for MikroC is available to past customers (ref. http://www.mikroelektronika.co.yu/en/compilers/) - so you may wish to try the trial versions of the software recommended by Microchip to see how it suits our needs, and then look at MikroC at a later point (it won't cost you extra).

    That also said, if you've money to burn, go for the full deal!!! The decision is ultimately yours, and you will find that whatever decision you make it will be the right one, its just that you have to make it work.

    Dave
  10. nanovate

    nanovate Well-Known Member

    Joined:
    May 7, 2007
    Messages:
    665
    Location:
    USA
    HI-TECH PICC-Lite will compile for the PIC16F877A. What you'd do is compile (in MPLAB) then it would output a .hex file which your EasyPIC4 software would use to load into the PIC16F877A.

    MikroC has a 2K limited demo versionhttp://www.mikroelektronika.co.yu/en/compilers/mikroc/pic/download.htmAlso do not forget to set the configuration bits and to download the PIC16F877A datasheet.

    And as Dave said earlier "whatever decision you make it will be the right one, its just that you have to make it work" :)

    Cheers
    John
  11. Dave

    Dave Senior Member Staff Member

    Joined:
    Nov 17, 2003
    Messages:
    6,961
    Lol! I'm not very good at finding the free demos on manufacturers website - I did this in another thread yesterday!

    Anyway, you can at least try MikroC before you buy, and then take advantage of the discount offer at a later date by virtue of the fact that it is open to past customers. I would certainly recommend you do this, it won't cost you anything and it will allow you to deduce what is the best approach for you - remember, just because one person likes one package doesn't mean others will.

    Dave
  12. carlcat

    carlcat Thread Starter Member

    Joined:
    Aug 22, 2007
    Messages:
    14
    Location:
    VA
    Thanks for being more perceptive than I am. I checked with the distributor regarding the "past customers discount" for any unknown "small print"( i.e. time limit) and he indicated that as long as I'm in the customer database from purchasing the develpemental board, I will always qualify for the discount. In the meantime, as you suggested, I'll go with the demo. Thank you greatly for your help. I'll keep everyone up-to-date from a beginner's perspective on how everything's working out...at worst, my reviews might be a good cure for insomnia.

    Thanks again.
  13. Dave

    Dave Senior Member Staff Member

    Joined:
    Nov 17, 2003
    Messages:
    6,961
    No problem. Thanks for agreeing to post back with your comments so that others may benefit from your experience.

    Have fun programming!

    Dave
  14. sc1500

    sc1500 New Member

    Joined:
    May 24, 2008
    Messages:
    1
    Hi all,

    I have a similar problem to that being discussed. I have the EasyPIC4 which is excellent and crammed with hardware. MikroElektronika claim that the limited 1k (not 2k) program footprint is ample for most prjects. This simply isn't the case! The problem is that the programming and debugging hardware is on the EasyPIC4 board and is therefore MikroElektronika proprietry - I cannot use MPLAB to program or debug. I also have a fully-licensed C18 compiler and am competent with the (albeit buggy - it's free at least!) MPLAB IDE. I can compile with C18 in MPLAB and load the hex onto the PIC with MikroElektronika's environment. However, I would really like to be able to debug my code too, since it'll never work first time. Any suggestions on how this might be done?

    Cheers,

    Sean.
Similar Threads: Mlab mikroC
Forum Title Date
Embedded Systems and Microcontrollers Which MLab complier and other questions Dec 1, 2009
Embedded Systems and Microcontrollers proteus and mikroc Jun 8, 2014
Embedded Systems and Microcontrollers MikroC debugger and #define Jun 3, 2014
Embedded Systems and Microcontrollers mikroC Pic16f628a. my buttons program dont work! Mar 29, 2014
Embedded Systems and Microcontrollers PIC programming help in mikroC Mar 16, 2014

Share This Page