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 wan to learn and build cool stuff too, so i guess i might as well go with PIC, since i already have the tools like the PICDEM 2 board and the ICD 2...

    can the PICkit2/3 connect to the PICDEM board?or is it one where you just connect to the circuit ur making??

    and i also like the fact that you can do simulations with MPLAB sim and proteus...
     
  2. 3v0

    3v0 Coop Build Coordinator Forum Supporter

    Joined:
    Jul 14, 2006
    Messages:
    9,404
    Likes:
    227
    Location:
    OKLAHOMA USA
    The pickits are like the ICDs in that you connect to any target board that has an ICSP connector. The ICDs use a RJ connector and the picKits use a six pin .1in pitch pin-header, but they both use the same signals.
     
    Last edited: Oct 22, 2010
  3. yohanevindra

    yohanevindra New Member

    Joined:
    Nov 26, 2008
    Messages:
    143
    Likes:
    0
    Location:
    Sydney, Australia & Colombo, Sri Lanka
    ohhhh..right right..now i get it...im considering using my current PICDEM as the development/debuggin board...saw the PICkit3 dev board on the microchip website...might buy it later once i get into the game...
     
  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

    It sounds like you have everything you need. If you do not have them get about 3 solderless breadboards for about $5 each. Pololu has them for about that. I know you can do a bit better but do not recall where.

    I buy power adapters at the local thrift store. Mostly I use ones with 9VDC output. I cut the end from the DC cord and solder a little card with a 5V regulator on it. Works like a charm.
     
  6. cr0sh

    cr0sh Member

    Joined:
    Jul 10, 2010
    Messages:
    928
    Likes:
    17
    Location:
    Phoenix, Arizona
    I know there are open source projects (boards and such similar to the Arduino, for instance), but I have yet to see (outside of maybe small handful of certain processor models - unless I am mis-remembering) an open-source C/C++ or BASIC compiler for the complete (or even a large subset of) PIC lineup. If I am wrong, please educate me (and point me to some resources)! The one thing that drew me most to the Arduino was that it was completely open source from the ground up (well, nearly so - the ATMega isn't an Open Cores project, unfortunately) - and that it worked perfectly on my 64-bit Linux system without any problems. Prior to getting into the Arduino, I was playing around with a Parallax Basic Stamp 2 OEM kit, but when I switched to a 64-bit distro - there was no longer any way to use the byte-code compiler. I still don't remember how I found out about the Arduino, but I am glad I did...
     
  7. Jon Chandler

    Jon Chandler Banned

    Joined:
    Feb 28, 2008
    Messages:
    130
    Likes:
    2
    3V0, why do you add a 5 volt regulator to a 9 volt supply? Why not use a 5v supply? The ones for cell phones work well. Just be sure that they are regulated. The small "non-cube" switchers are almost always regulated.

    As far as open source PIC stuff...

    The Amicus system is a PIC-based, Arduino-shield-compatible system that is "open design." The Amicus Compiler is the full version of Proton Basic, but limited to the PIC18F25K20. Gerbers for the board are available from Crownhill.

    The TAP-28 board supports most 28-pin PICs. It's aimed towards applications, with dedicated connectors for ICSP, UART, I2C/SPI, Sensors, PWM, servos, etc. It's licensed under a Creative Commons SA-NC-BY license, with a waiver for commercial use as part of a larger system (e.g., the boards can be sold as part of a larger assembly, but individual boards can't be sold). The boards are available inexpensively. The Gerbers will be posted as soon as the revised version is checked out (Monday if the DHL-Gods are kind to me).
     
  8. cr0sh

    cr0sh Member

    Joined:
    Jul 10, 2010
    Messages:
    928
    Likes:
    17
    Location:
    Phoenix, Arizona
    Windows only, no source code? That's an interesting definition of "open".

    I'm mostly interested in the availability of an open-source PIC compiler; for AVR there is the gcc-avr toolchain - is there something similar available for PIC?

    So far - I've found this (but it hasn't been updated in a while):

    GPUTILS - GNU PIC Utilities

    That's pretty slim pickin's, too - seems like it is for PIC assembler only (and I'm not sure for which processors/family of PICs)...
     
  9. cr0sh

    cr0sh Member

    Joined:
    Jul 10, 2010
    Messages:
    928
    Likes:
    17
    Location:
    Phoenix, Arizona
  10. nickelflippr

    nickelflippr Member

    Joined:
    Oct 20, 2006
    Messages:
    891
    Likes:
    18
    Location:
    Oregon, USA
    JalV2 looks to have full support for eight bit PIC's? I use Great Cow Basic (GCBasic), and it will program 10f to 18f PIC's. GCBasic also compiles for Atmel 8 bit devices. I guess because Microchip C18 is basically free (non optimized version), you don't see much development on PIC open source C compiler front?
     
  11. 3v0

    3v0 Coop Build Coordinator Forum Supporter

    Joined:
    Jul 14, 2006
    Messages:
    9,404
    Likes:
    227
    Location:
    OKLAHOMA USA
    The cell phone here because are recycled, handed out to battered females. A good thing. I buy mystery wall warts for $1 or less at THE local thrift store. They often go to students so I need a slow but steady supply.

    Using know regulation may be "belt and suspenders/braces" at times but it also gives me over voltage and short protection. It also allows me to use a wider selection of wall warts.

    I made a bunch of the regulator blanks a while back and it only takes a few minutes and about $1 worth of parts to populate one with the voltage regulator I need. Note that at most I use 300mV TO-92 case regulators with this PCB.

    To a degree this is a to each his own sort of thing. Some people like to build regulator boards with multiple voltages or even adjustable ones. I use these in my teaching and less options means less problems.

    regulator-3 001_cropped.JPG



    [​IMG]
     
  12. 3v0

    3v0 Coop Build Coordinator Forum Supporter

    Joined:
    Jul 14, 2006
    Messages:
    9,404
    Likes:
    227
    Location:
    OKLAHOMA USA
    In the text is says.
    I wonder how far the work has progressed ?

    EDIT: I played with it a bit. I specified -mpic16 on the command line and it generated ASM had the line "list p=18f452". The asm generated is for gputils. I did not go so far as to loading it. I am guessing that there is no way to integrate it into MPLAB 8 but expect that it should show up in MPLAB X in that it is open source.
     
    Last edited: Oct 23, 2010
  13. Gayan Soyza

    Gayan Soyza Active Member

    Joined:
    Oct 23, 2006
    Messages:
    1,822
    Likes:
    19
    Location:
    Colombo
    Go for a processor.

    I like ARM..............
     
  14. 3v0

    3v0 Coop Build Coordinator Forum Supporter

    Joined:
    Jul 14, 2006
    Messages:
    9,404
    Likes:
    227
    Location:
    OKLAHOMA USA
    Of late I have not done any applications that a 10Mips PIC18 can not handle. If I ever get to the point where I can not buy a powerful enough PIC, I will be open to looking at other vendors. I understand that you need a pickit3 to do the PIC MIPS so at that point ARM will be an option.
     
  15. yohanevindra

    yohanevindra New Member

    Joined:
    Nov 26, 2008
    Messages:
    143
    Likes:
    0
    Location:
    Sydney, Australia & Colombo, Sri Lanka
    does anyone know how well MPLAB IDE and PICkit2/3 or ICD2 will work with windows 7 64-bit?
     
  16. yohanevindra

    yohanevindra New Member

    Joined:
    Nov 26, 2008
    Messages:
    143
    Likes:
    0
    Location:
    Sydney, Australia & Colombo, Sri Lanka
    also, how do you make the connections between an ICD/PICkit with the PIC you wnt to debug/program?is it just a simple case of making the correct connections, and powering up the PIC?i know you can program it using the eval boards, but how about if you do it on a bread board?
     
  17. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,319
    Likes:
    653
    Location:
    Derbyshire, UK
    Just make the required connections, it's explained in the PICKit instructions.
     
  18. yohanevindra

    yohanevindra New Member

    Joined:
    Nov 26, 2008
    Messages:
    143
    Likes:
    0
    Location:
    Sydney, Australia & Colombo, Sri Lanka
    ohhh..right right..jus ordered my pickit...will have a look when it comes..
     
  19. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,319
    Likes:
    653
    Location:
    Derbyshire, UK
    You can download all the documentation, it only comes on CD anyway.
     
  20. gogo2520

    gogo2520 New Member

    Joined:
    Oct 4, 2004
    Messages:
    66
    Likes:
    1
    Ya buying a hacked version of Bloodshed (which is GPL) sucks
     
  21. arhi

    arhi Member

    Joined:
    Apr 17, 2008
    Messages:
    887
    Likes:
    12
    Location:
    Belgrade, .rs
    mplabx - it is free, it works great on win7 64bit, linux (fedora 13 64bit) and osx 10.6 (osx is missing c18 compiler) (works also great on xp but I have not tested it personally on xp)

    what is problem with mplabx is that it does not support pickit2, looks like microchip guy's deprecated pk2 so they are not adding support for it in new tools. (pk3 is supported as well as ICD2, ICD3 and REAL ICE

    for the guy with ICD2 - don't bother to get pk2, if you need usb to ttl serial, logic analyzer etc, better spend your money getting buspirate.. ICD2 is still supported (compared to pk2) and if my memory serves me well can do more advanced debugging then pickit2 (you can make some complex breakpoints etc) .. you might want to go pk3 but ICD2 should be enough

    wrt ARM, for the new kids in the block I suggest checking out DISCOVERY board, it is under 10$ ARM Cortex M3 board with integrated debugger (ST-Ling spy by wire) so you don't need any external tools, just get that board and you have full dev solution for experimenting, it has all pins broken out on standard .1" raster ..

    wrt ARM vs PIC in the 32bit region, great thing about ARM is that with newer cores (like cortex m3 for e.g.) all chip manufacturers share same core, so if you write code for Phillips and want to move to ST it is just matter of using different hw libraries for "other stuff" (like serial ...) .. great thing about arm is 7+ DMA channels, very versatile buses inside the mcu .. so stuff like "copy video from SD card to GLCD" are very fast and simple ... on the other hand, if you are doing a lot of bit-banging PIC has faster access to the GPIO's ... nice thing about arm is that gcc for arm is free, open source .. lot of ppl use it .. it works very good - on the other hand C32 limits free version to no optimization and gcc-c32 is still pretty young and miss a lot of options (but it will get there, hopefully, especially if mplabx takes in 2011)



    wrt mips (pic32mx) you need pk3 to debug them but if you just want to flash them pk2 gets the job done. note that pic32 simulator is pretty rudimentary inside mplab, some major things dont get simulated properly ...

    new version (beta4) of mplabx came few days ago and it has (different from beta3) the simulator (I tested with dspic and it worked like a charm)

    just my 0.02$
     

Share This Page