1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

PIC vs Arduino

Discussion in 'Microcontrollers' started by yohanevindra, Oct 21, 2010.

  1. yohanevindra

    yohanevindra New Member

    Joined:
    Nov 26, 2008
    Messages:
    143
    Likes:
    0
    Location:
    Sydney, Australia & Colombo, Sri Lanka
    i know i posted a thread sometime ago, but now again im at the same crossroads...

    PIC or Arduino???

    I know that PIC is jus barebones, and the arduino is an AVR, with a board...

    the arduino comes with add-on boards like bluetooth,and ethernet connectivity and things like that..so it seems more attractive than PIC because it seems easier to implement more complex solutions..

    are PIC and Arduino ultimately the same???i've used PIC with C....i know arduino has its own special language, and special libraries with the add-on boards...

    in terms of becoming a better hobbyist/techy person, well versed with hardware, is PIC or arduino better?or both?
     
  2. misterT

    misterT Well-Known Member Most Helpful Member

    Joined:
    Apr 19, 2010
    Messages:
    2,697
    Likes:
    368
    Location:
    Finland
    The idea of the Arduino is to hide much of the "techy" stuff from the user. It is also possible to program the Arduino using C (avr-gcc for example) or assembly.
    So if you want to learn embedded programming etc., Arduino is a good choice (just don't use the "Arduino IDE"). If you wan't to learn electronics then build the circuits yourself.. for AVR or PIC.
     
    Last edited: Oct 21, 2010
  3. yohanevindra

    yohanevindra New Member

    Joined:
    Nov 26, 2008
    Messages:
    143
    Likes:
    0
    Location:
    Sydney, Australia & Colombo, Sri Lanka
    ok....well i know embedded programming cos i've learnt the motorola 68HC11 and PIC in uni...just its that now, the geek in me wants to try out all these cool ideas in my head...i guess it might be good to do a bit with arduino and when im more experienced get onto PIC..thing is, i dont think i'll be capable of adding ethernet, bluetooth and other capabilities to a PIC - can you even do those with PIC???

    and with avr-gcc, you can still use the same arduino libraries?

    why do you say not to use the arduino IDE?is it too complex?or too easy?

    also, for some reason want to make my own joystick and steering wheel for my computer..and seems like online there are solutions for both arduino and PIC...
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. 3v0

    3v0 Coop Build Coordinator Forum Supporter

    Joined:
    Jul 14, 2006
    Messages:
    9,404
    Likes:
    227
    Location:
    OKLAHOMA USA

    The Arduino, like the Basic Stamp, is a micro controller with training wheels. They have their place.

    From what I have seen the Arduino's language is C. It includes a bit of code to hide main() from you and is often used with a boot loader. But it is still c.

    The one truly neat thing about the Arduino is that there are a small set of standard boards that allow the use of shields aka add on boards. If you do not like the idea of designing your own hardware this can be a plus.

    One the down side buying the ready made boards can add up. If you are going to build you own boards you may as well build designs tailored to the application at hand. For me that can be a significant part of the enjoyment.

    Unless you need or want the hand holding provided by Arduino your choice is really PIC vrs AVR vrs ???.

    If the plan is to use C the brand name on the micro controller matters little.
    Both vendors provide a range of chips. You need to pick one with enough resources to get the job done, maybe with a bit of margin.
     
  6. 3v0

    3v0 Coop Build Coordinator Forum Supporter

    Joined:
    Jul 14, 2006
    Messages:
    9,404
    Likes:
    227
    Location:
    OKLAHOMA USA
    You can purchased boards for use with both PIC and AVRs for internet, bluetooth etc.

    Given that you have had an embedded system class I suggest you skip the Arduino and buy a programmer like the picKit2 or the AVR equivalent. The picKit2 allows you to program chips in circuit and more importantly it provides run control with breakpoints. It also can function as a simple logic analyzer or a USB to TTL level serial tool. For $35 plus shipping it is quite a buy.

    The downside with PICs is that there is not one commonly used free C compiler like AVR. But there are several demo versions or inexpensive C compilers that can be used.
     
  7. yohanevindra

    yohanevindra New Member

    Joined:
    Nov 26, 2008
    Messages:
    143
    Likes:
    0
    Location:
    Sydney, Australia & Colombo, Sri Lanka
    i already have the PICDEM board and an ICD 2 so i guess i might as well go with PIC then...but wht boards can you use PICs with to get internet and bluetooth capability...

    the ICD2 can also function as a logic analyser and TTL level serial tool right???is there a diff between PICkit2 and ICD2?is ICD2 better?

    i thought PICs use the MPLAB IDE??is the language different to AVR compared to PIC??is there a big difference?is there any site where i can see the pros and cons?

    demo versions and inexpensive compilers wih AVR?
     
  8. blueroomelectronics

    blueroomelectronics Well-Known Member

    Joined:
    Jan 21, 2007
    Messages:
    12,536
    Likes:
    170
    Location:
    Toronto, Canada
    Give Swordfish BASIC a try, it's only for the 18F series but is an excellent compiler and has a free student version.
     
  9. misterT

    misterT Well-Known Member Most Helpful Member

    Joined:
    Apr 19, 2010
    Messages:
    2,697
    Likes:
    368
    Location:
    Finland
    Don't use Arduino IDE if you want to learn things. Use it if you want to get things done the easy way.
    The Arduino IDE uses avr-gcc for compiling so it might be possible to use arduino libraries in your own projects and still code proper C.. I don't know for sure.
     
    Last edited: Oct 21, 2010
  10. misterT

    misterT Well-Known Member Most Helpful Member

    Joined:
    Apr 19, 2010
    Messages:
    2,697
    Likes:
    368
    Location:
    Finland
  11. yohanevindra

    yohanevindra New Member

    Joined:
    Nov 26, 2008
    Messages:
    143
    Likes:
    0
    Location:
    Sydney, Australia & Colombo, Sri Lanka
    i guess i do want to increase my knowledge and learn stuff...and be able to come up with solutions on my own rather than just following instructions...may be i should stick with PIC...

    i guess with PIC too, the C compiler isnt really free is it? arrggghhhh...this is hard..im tempted to stick with PIC since i already have most of the hardware...
     
  12. 3v0

    3v0 Coop Build Coordinator Forum Supporter

    Joined:
    Jul 14, 2006
    Messages:
    9,404
    Likes:
    227
    Location:
    OKLAHOMA USA
    See answers above in italic.
     
  13. yohanevindra

    yohanevindra New Member

    Joined:
    Nov 26, 2008
    Messages:
    143
    Likes:
    0
    Location:
    Sydney, Australia & Colombo, Sri Lanka
    ok..so i guess i should purchase a pickit2 or maybe pickit3, and get back into the PIC game...

    i realised the differences between the IDE's and compilers..

    can we try the MPLAB X beta?and does it have a C compiler?any chance it'll be free?

    but wouldnt you say tht PIC is more popular thn AVR or PIC?or is that question a bit too political? :p lol
     
  14. 3v0

    3v0 Coop Build Coordinator Forum Supporter

    Joined:
    Jul 14, 2006
    Messages:
    9,404
    Likes:
    227
    Location:
    OKLAHOMA USA
    I would get the picKit2 now. The picKit3 is about 2X the price and does not have the other utilities. Latter as the picKit2 becomes less useful due to the lack of support for new chips you can still use it as a logic analyzer or a uart tool.

    MPLAB X is not only free but open source. It is based on netbeans. But there is no compiler support for 16F and 18F PICs, and no support for the pickit's yet. But it does have ICD2 support. I am running MPLAB 8 and MPLAB X at the same time. I am using X for editing and 8 for building and programming. In time we should get the compiler and pickit support.

    There are no cost version of Microchip C18 compiler and Hi-tech C that allow for unlimited code size but do not optimize as well as the version you pay for. It is a lot cheaper to spend an extra dollar for more memory then buying a compiler.
     
  15. MikeMl

    MikeMl Well-Known Member Most Helpful Member

    Joined:
    Mar 17, 2009
    Messages:
    11,125
    Likes:
    564
    Location:
    AZ 86334
    Another recent entry is the TI MSP430 LaunchPad. Includes a USB Flash loader and debugger for $4.30.
     
  16. wannaBinventor

    wannaBinventor Member

    Joined:
    Jun 24, 2010
    Messages:
    214
    Likes:
    2
    I think the problem with the TI Launchpad is that it's not an in circuit programmer like the PICkit2. If you are anything like me, you have wires running all over the place on the breadboard, and the thought of pulling the uC out of my breadboard every time I need to reflash it would slow me down 5 fold. Plus, it seems that many of the beefier 16f pics (and quite possibly the 18F, but I'm just not familiar) can be bought in PDIP packages, while TI's beefier MCU's seem to use breadboard unfriendly packages. So in short, the Launchpad isn't going to program much beyong the lower end value series TI uCs.

    Though I do like the idea of the 16 bit vs 8 bit at similar prices.

    Please correct me if I'm wrong on any of the above.
     
  17. Larry Lamb

    Larry Lamb New Member

    Joined:
    Oct 22, 2010
    Messages:
    8
    Likes:
    0
    eh, PIC and Arduino are not really a comparison. Arduino is the software more than anything as I understand it.
    As one person put it - do you want to learn or just get some cool stuff working? To learn I would suggest going for a microcontroller with lots of support and a good IDE. Atmel, Microchip and Renesas are worth considering - I put Renesas in because their compiler and IDE are free (up to 64k which is fine for me) and are excellent. I prefer AVR's to PICs, in fact I way prefer them.
    If you are just looking to play and learn a little about electronics then go for an Arduino. But you should also consider mbed. This is a really cool piece of kit from ARM, check it out!
    L
     
  18. nickelflippr

    nickelflippr Member

    Joined:
    Oct 20, 2006
    Messages:
    891
    Likes:
    18
    Location:
    Oregon, USA
    The TI Launchpad supports the "Spy-Bi-Wire" two wire program/debugging. Jumpers are accessible for off-board program/debug, or you can split the Launchpad into separate parts (program/debug and target). Swapping out the straight header to a right angle one could make it portable to different targets. Agree that there are limited number of friendly parts to work with, maybe that will change in the future.
     
  19. cr0sh

    cr0sh Member

    Joined:
    Jul 10, 2010
    Messages:
    928
    Likes:
    17
    Location:
    Phoenix, Arizona
    Ultimately, the Arduino is a platform that can be as simple or as complex as you want it to be. The board is nothing but a carrier board for the ATMega processor. You can pull the processor and use it "standalone", just like any other microcontroller. You can use the Ardunio IDE for development, compile and upload via the bootloader. Or you can ditch the bootloader, and use an ISP programmer (from the same IDE, if you want). Or, you can just use a standard avr dev toolchain and treat the board like a carrier board. Its all up to you. I like the Arduino because for quick and easy projects, its a fast way to get up and running. For beginners, its a pretty nice device. It allows you to grow. You might get tired of the IDE - so you move to something else, like Eclipse. Or maybe you set the IDE up to allow you to use an external editor (this can be done easily as well). Maybe later you move to a full AVR dev toolchain. Maybe you keep using the Arduino library, as well as the third party stuff (what's the hangup with having to re-invent and re-learn the wheel each time? Unless the code is really bad or slows things down too much - and there is that kind of code in the Arduino, such as the port manipulation code - there's little reason to change it for most needs). Maybe later you ditch it all and code in assembler. It grows with you, you can take it and do what you like, how you like. Furthermore, the cost for the Arduino is technically very cheap. Yes, a full board is going to cost you around $30.00 US. But the chip itself (without a bootloader) is very inexpensive (albeit, not as inexpensive as many PICs - but unless you are planning on manufacturing a ton of product, you probably won't care). If you already have an ISP programmer, you can just get a chip, the resonator or crystal/cap combo, and a few other minor inexpensive parts, and have a breadboarded "standalone" Arduino running for very little cost. The toolchain is completely open-source and free, which is something you can't say about PICs, unfortunately...
     
  20. nickelflippr

    nickelflippr Member

    Joined:
    Oct 20, 2006
    Messages:
    891
    Likes:
    18
    Location:
    Oregon, USA
    Fortunately there are open source projects for the PIC. And those who are inclined, will look them up. Open source PIC projects are not everyone's cup of tea, as a certain amount of DIY is usually involved (depending....maybe a lot). Can't argue with Arduino's success.
     
  21. 3v0

    3v0 Coop Build Coordinator Forum Supporter

    Joined:
    Jul 14, 2006
    Messages:
    9,404
    Likes:
    227
    Location:
    OKLAHOMA USA
    I would suggest that Arduin's real success is in finding the right mix of hand holding, flexibility, and cost. And perhaps the right sort of hype/PR. Once you get past the training wheels it is just another micro controller.

    Do not read anything negative into the above.

    I did not realize that you could separate the programmer from the target with the launchpad. Way cool and only $5 for a 16 bit system with debug. What is not to like (other then no DIP chips)! Will have to take a look at the tool chain.
     
    Last edited: Oct 22, 2010

Share This Page