Another salvo in the PIC vs. AVR holy war

holy war

Ah, PIC vs. AVR, the never-ending battle of electronic design supremacy. Some people swear by Atmel’s AVR microcontrollers, while others are wrong. [majenko] is firmly planted in Microchip’s PIC camp, so he wrote up a nice comparison of Atmel’s AVR versus Microchip’s PIC family of microcontrollers. The results aren’t that surprising; PIC microcontrollers come out as a better product that no hobbyist uses because no hobbyist uses them.

Atmel and their series of AVR microcontrollers has seen a huge increase in popularity in the hobbyist market in the last few years, no doubt thanks to the Arduino and other AVR-powered dev boards. This isn’t to say Microchip and PIC haven’t seen their time in the lime light; there was a time when you could actually buy electronic components at Radio Shack, including kits containing Microchip’s very popular but somewhat outdated Basic Stamp.

After going over the capabilities of the Atmel AVR ATMega328p, the similarly equipped Microchip’s PIC PIC18F25K80, and TI’s MSP430G2533, [majenko] found the perennial favorite, the AVR, lacked in some very important categories. The AVR has a lower resolution ADC, fewer PWM pins, fewer 16-bit timers, while costing about $0.75 more.

Of course [majenko]‘s analysis doesn’t take into account the intangibles of choosing a PIC over an AVR. Thanks to the Arduino’s adoption of the AVR, there are many, many more code and schematic examples floating around on the Internet for just about every project imaginable. The development tools for PIC are a bit more expensive than their AVR equivalents; A PICkit2 runs about $50 while AVR ISP programmers can be found just about everywhere for pocket change.

It’s a lazy Sunday, so all ‘yall can go on and argue in the comments.

Comments

  1. FrankenPC says:

    To me, this is just like the arguments about various robotics platforms. I don’t care how good the mechanical platform is or how competent the control logic is. The question is: what can it do? And that comes down to software. Ultimately, the code is the end product. AVR platforms have a LOT of code. I grew up on the PIC, so this fact saddens me.

    • Alex Rossie says:

      +1

    • StripeyType says:

      There’s also the situation with assembly language and ease of compilation of C. With the AVR being a )comparatively – maybe a decade) newer architecture, with more working registers, it’s easier to write assembly for if you learned assembly on bigger systems, and it is *certainly* easier to write a compiler for. All of those concerns present themselves in the available toolchains. There are more and cheaper C compilers for AVR than there are for PIC, until you start to talk about the much newer 18-series PICs.

      It helps to remember what PIC stands for, as an acronym. “Programmable Interrupt Controller.” That we use these chips for far more than that these days is a testament to their flexibility, but this architecture has been showing its age for a while now (which is of course what the 18 series exists)

      • Greenaum says:

        “Programmable Interrupt Controller” as in the 8259 is known as a “PIC”, yes. But that’s not the same thing as the PIC microcontrollers. It seems unlikely that’s why PIC, the MCU, is called the PIC. Perhaps programmable integrated circuit? But that’s a guess, do they have a FAQ?

        • bandit, Albuquerque says:

          > PIC stood for “Peripheral Interface Controller”

          That is the original name, and the original purpose. That is one of the reasons for the funky PIC16 architecture. Yes, the MCU is the PIC. The concept was to put a bit of programmable logic where a PLD/PLA/PAL combinatorial logic was not sufficient. Not a bad concept, weird RISC solution. (The bank switching part is the real nightmare.)

          Then, the market opened up and they got fancier, and Atmel started up as a viable competitor. All of the other big boys (Motorola, AMD, Intel, etc) were interested in the high end.

          The PIC line started branching into a “real” architecture after the PIC16’s because of demand and the user desire to get away from the funky RISC banks.

          Kind of weird to write assembler for it. Bank switching was only part of it. The tables have to live in lower memory because of the addressing scheme. You would add an index to the table address to change the PC to execute a return instruction with a value. You *really* needed the $1K development system to watch the trace and single-step.

          I actually pitied the folks who did a C compiler for the PIC16, and CCS did a pretty good job. Too bad they failed **miserably** with the PIC24 version.

          The 8259 is a completely different beast (and beast it is – right up there with the 16550). This biz has enough TLA’s that there is bound to be overlap.

      • Ren says:

        I may be wrong, but I thought PIC stood for “Peripheral Interface Controller”
        which limited its (original?) capabilities as microprocessor.

  2. Matt says:

    What about ARM? Cortex M0

    • Justin says:

      Apart from a lone LPC in DIP package most ARM come in a footprint that intimidates newcomers.

      • Elias says:

        Soon there will be the LPC810, a Cortex M0+ in a 8 pin DIP package…

      • asdf says:

        Newcomers use devboards, the various Discovery boards and Launchpads have gained a lot of popularity.

        • I am an experience pro, and I still use dev boards so I can start early before cutting my own hardware. A good way to learn a new chip and write device drivers. Used dev boards for both single small clients and large ones. Last gig, the manager ordered them in lots of 6..8, and he is one of the sharpest developers turned managers I have ever seen (A fair chunk of Dolby film sound is him).

        • Jan says:

          Problem with ARM is complexity – writing a simple “Hello world” to a serial port on an ARM or blinking a LED is an order of magnitude more complex affair than doing the same with a small 8bit micro.

          That is certainly not to bash ARM – the micros based on this architecture are great, but it is a very steep learning curve for a beginner, because the chips are a lot more complex. Toolchain setup (unless you have $$$ for a commercial one), linker scripts, startup code, libraries, JTAG/SWD … Examples are few and far between and some are even riddled with mistakes and bugs.

          I have been changing up from AVR/PIC to STM32F3 and it took me a good while getting everything going. And I am certainly no newbie at compiler setup (I have built my own toolchain).

          • asdf says:

            That’s what people keep claiming, but I don’t agree. In both cases the steps are the same: configure the core clocks, configure the I/O, configure a timer. Bigger micros may have more complex clock setups, but with the current focus on low-power even that’s no longer necessary the case.

            Then again looking at any discussion forum it seems like a huge portion of people are completely unable to figure out anything for themselves and give up immediately if no pre-digested one-click solution is shoved into their faces.

  3. Sven says:

    My point on the whole thing (This excludes the DSPIC, AVR32 and other things that aren’t 8 bit micros but use the same names)

    PIC: Great for school environments since the chips are basically indestructible, you can short out pins and there is only a small chance that the chip breaks. There seems to be lots of course materials for PIC. And they can be had at insanely low prices in volume.

    AVR: Fairly small company meaning high volume pricing and the chips pretty much break if you accidentally short out a pin. The hardware is geared towards C programming and it’s very easy to make things work. Programmers can be had for $4. GCC works 100%

    I’m using AVR because i can set up the hardware and software environment for almost nothing, and it’s easy to use. Lots of example code to study (steal from).

    • matt says:

      You can also get 25 Microchip chips completely free every month (with free shipping) as sample parts.

    • Eaterofpies says:

      This.

      A few months ago I decided to look over a bunch of micros for hobbyist use. I ended up sticking with AVRs even though I really wanted to go to something else because the toolchain is just so easy to setup, the datasheets are such high quality and there is a large hobbyist community around them. In the end I went for an XMEGA because the ATMEGA series are a bit overpriced for the hardware you get.

      From memory my reasoning was
      ARM – Too much screwing around with bad datasheets and CRT0s
      PIC(not pic32) – no c++ (I find templates really useful for microcontroller programming
      PIC32 – has gcc (mips based) but not a lot of information getting a programmer working under linux
      68k based microcontrollers – really expensive programmers though the chips are cheap
      MSP – readily available chips are really underpowered for what I want to do

    • “Fairly small company meaning high volume pricing and the chips pretty much break if you accidentally short out a pin.”

      Um, NO. Back in ECE476 at Cornell (Now EECE4760…), my partner and I accidentally connected an AVR backwards when prototyping on a breadboard. On this particular chip, that meant +5v to GND and GND to the +5v input pin. Obviously, the chip did NOT like this and became hot enough to melt the breadboard below it and color it brown.

      After shutting off the power and plugging in the chip (correctly) to a non-melted part of the breadboard, it worked perfectly.

  4. aegmop says:

    AVR, PIC? Come on, it’s 2013, why bother with ancient microcontrollers when you have wonderful 32-bit ARMs.

  5. Zak says:

    Heres a nice reddit discussion explaining a few things that are wrong with this article http://www.reddit.com/r/electronics/comments/19ztm4/the_atmega328p_is_an_old_nag_that_should_be/

    Some main points:
    Article compares RISC and modified Harvard, they’re different things. AVR is also modified Harvard.

    PIC executes 1 instruction every 4 CPU cycles, at 64MHz that’s 16MIPs, while with AVR most instructions take 1 CPU cycle, giving up to 20MIPs.

    AVR dev stuff much cheaper than PIC, AVR compiler is free (AVR-GCC), programming tools can be obtained for <£5.

    • lwatcdr says:

      Yep you can pretty much throw out any write up microcontrollers where the author does not understand Harvard architecture is or what RISC is and that one is a memory architecture and one is an ISA. In other words why did this make HAD?

      • Cyronin says:

        I came to comment specifically on this. Highlighting something as vague and conceptual as “RISC” (which PIC actually follows, anyways) as a negative thing, and highlighting “modified harvard” as a positive thing (which AVR is anyways, purely due to the inclusion of lpm and spm) shows a massive deficiency in the a person’s understanding of the microcontrollers being compared.

        Combine that with an apparent misunderstanding of how PIC instruction cycles work, a failure to include I/O drive/sink current and power consumption specs for comparison, and the biggest shortcoming of all, a lack of analysis into development tools available for the platforms (development kits, IDEs, linux/gcc compatibility, design workflow, design libraries, available code and educational material), makes me disregard this comparison as ill-conceived.

        If i am going to go ahead and plug my own opinion in here, I would advocate the MSP430 as my favorite platform to develop for, simply due to the sheer wealth of resources available in CCS, the high code density and performance of the core, the capability to cheaply runtime debug, and some of the fantastic power efficiencies of some of the chips.

    • Elias says:

      Looks like the voting system of reddit has spoken and removed this crap from /r/electronics. Now, looks like it does not work that way on HaD.

      I mean these AVR vs. PIC flamewars are funny, but it’s more interesting when it is not based on incompetent horsepucky like the linked article.

  6. Destate9 says:

    Haha, you mad, Brian?

    But naw, I’m a hobbyist that uses PICs. I have found plenty of guidance online thanks to our good friend Ian Lesnet

  7. apexys says:

    That whole fanboyism is completely useless.
    I’ve programmed on AVR, PIC, MSP430 and ARM. Every platform has its strong and weak points. I think AVRs have the nicest datasheets, PICs cost the least once you have the tools, MSP430s need very little power and ARM has lots of juice for intensive calculations.
    I think it is part of the hacker spirit to be able to understand different platforms and to be able to code for them all, regardless from which platform you started on.
    And thanks to the C programming language, most things except the peripherals are the same.

  8. sterian88 says:

    PIC’s major weakness is their development tools. AVR-GCC for AVR’s is the “killer app” that distinguishes AVR from PIC. Timers, RAM, etc…..that’s all the little stuff. It’s the development tools and environment that makes the difference.

    AVR: One compiler (based on high-quality high-reliability GCC) that works for all AVR processors and is completely free and open source.

    PIC: Different compilers for different families, proprietary compilers with big bugs (which I have encountered first-hand so am not just speculating), expensive unless you use the hobbyist feature-limited free versions.

    For me, the above is why I avoid PIC whenever I can. EXCEPT for the PIC32 family which has a GCC-based high-quality open-source compiler (comes with their ChipKit IDE). They still keep all their peripheral drivers proprietary, but I am hopeful that they are slowly changing their ways and eventually, someday see the light and reach parity with Atmel on development tools.

    • daniel says:

      Yes, this right here. AVR had GCC compilation with hardware breakpoints (well, one) using the AVR Dragon and standard hardware (ie no in circuit emulator silicon) back when you had just barely been able to use the low-end eval PIC C compilers for a couple of years. (around 2006)
      Microchip was unfortunately holding their good stuff behind a paywall, and Atmel got some better tools out there — I think that’s the step that made it easier for the more ‘average’ person to get a grasp on it. Things are a little more even now, but I think that’s the big inflection point where AVR started to win out over Microchip, which had been the #1 hobbyist micro for years.
      Unfortunately the architecture of the low-end Microchips make it difficult to write a C compiler, but they are still one of the cheapest (and good) options if you’re willing to either write assembly or use a proprietary C compiler.

    • Zee says:

      Check outthe offering from mikroelectronika. They offer amazing devboards for PIC and a full C toolchain

    • Drone says:

      You hit the nail on the head. Except for the PIC32 to get a full-featured PIC C/C++ toolchain and a hardware programmer/debugger, you might as well let the buggers hook a vacuum cleaner to your wallet. Not the case with AVR’s. Free excellent toolchain and you can’t be the now uncrippled AVR Dragon at $49. Microchip’s problem is not their technology – it’s their greedy marketing goons.

  9. sneakypoo says:

    Why? Just… why? *sigh* The only true answer to what you should choose is what chip suits the project you are currently working on.

    Personally I’m a fan of PICs so that’s what I use because I’m lazy and don’t feel like learning another architecture. The software is free btw (yes, there are slight limitations in optimization on the free version but hobbyists probably wont care, I know I don’t). Also the PICKit2 is outdated and you should be using the PICKit3 which is slightly cheaper. Or, if you want it dirt cheap you can buy/build a basic programmer for next to nothing (sacrificing debugging here of course).

  10. I think the development environments and toolchains available for each platform are vital. I switched from PIC to AVR because AVR-GCC is a strong development option that lets me work on my preferred systems with no hassle — when I made the switch, the PIC dev tools were lackluster on PC, and pretty much non-existant elsewhere. Combine that with lots of documentation, an active hobbiest development scene (even pre-Arduino-explosion), and some incredibly well-written libraries (LUFA alone is enough to justify my staying on AVR for what I need), and you have a friendly platform for hobby development. Even if the $0.75 per-chip premium wasn’t offset by the development hardware cost (and really, dev boards for AVR have an economy of scale such that I can get a Teensy for $10-20 cheaper than an equivalent PIC board; I’m not a fan of having to build up support circuitry every time I want to prototype something), the amount of time and resources I save by going this route makes it an easy decision for me.

    That said, I don’t subscribe to the holy war. Make cool shit, use whatever platform you want, and share the end result. That’s my Hacker ideal.

  11. Jimmy the Geek says:

    I tried (and failed) to do microprocessor programming several times over the years until I found the Arduino and it “just worked.” I can put together a hackduino for around $6 when I buy the parts 25 at a time. Let’s face it, not everyone has the time to figure out how to put together a bunch of hardware and software make make it work. Plugging a usb cable into a board, running a little program and clicking a button to load the program onto a board is the level of ease that you must have to make a solution that works for 99% of people who aren’t full time electrical engineers.

    • GOTHMOG says:

      Well, I am not full time electrical engineer, not even engineer but I can still solder a crystal, cap,resistor and USB connector to 18F4550 and upload code from my PC with one click on a button.
      Guess it’s not that easy as just buying the pre-programmed with bootloader Arduino.
      At the end of the day for me it’s just a of personal choice; PIC, Atmel, ARM – it doesn’t really matter if it keeps me happy and make my projects work.

  12. Jeff says:

    Who would use anything other than ARM?

    • mess_maker says:

      I’m not sure if you were expecting an answer, but I guess an answer would be: me, at this point.

      I have used PIC and currently am using AVR’s of all sizes. I look forward to delving into ARM in the future. Whatever I have on hand that fits the requirement gets used – 555, PIC or AVR.

      I am not trying to pic a fight, and I understand that everyone is entitled to their own opinion, but I look at this from many different angles:
      – Does cost matter? if this is a one off, then it most likely does not.
      – Does it do what I need?
      – Is there a better option?
      – What do I have on hand?

      This argument reminds me of Mac -vs- PC, a specific piece of software -vs- another piece of software or Ferrari -vs- Lambo… It is possible that anybody could purchase super-car but it doesn’t mean they are a good driver. A true artist is amazing with their chosen tool set. If it works for you, use it.

  13. Vis1-0n says:

    You have no $50 pickit2? You spend $8.20 for the parts and you make one yourself. See http://dangerousprototypes.com/forum/viewtopic.php?f=19&t=5216&p=50813#p50813 – and it also programs AVR’s too. And if your PC does not already come with a parallel or serial port, then you get the firmware in by using your raspberry pi… And if you don’t have a Rpi then you write the code yourself by studying the datasheets and using your $5 Stellaris Launchpad or STM32discovery or Mbed.

    • Jimmy the Geek says:

      Thanks for pointing out a lot of the huge barriers to getting the job done that average person will encounter when starting to program various chips. Most people don’t have the time to figure all that out when they just have a simple problem they want to solve. The solution is to just use Arduino, a USB cable and some free software to instantly solve all those and just get the job done.

  14. Alex says:

    I’m not convinced by his RISC vs modified Harvard argument. He’s wrong to claim that it makes PICs faster – average instruction time on a PIC is 4 clocks, but 1-2 on an AVR. Also, PICs don’t have native indirect addressing which slows them down even further.

    • Sean says:

      Yeah, it’s kind of an apples-oranges comparison there. AFAIK, both PIC and AVR are both Harvard architecture (separate data/instruction addressing) and RISC (simplified CPU insruction set). They have almost nothing to do with each other.

  15. Anonymous says:

    What these comparisons leave out is the quality of the compilers. I have no experience with Atmel C compilers but I can tell you that the C compilers for the PIC18 are all crap. I have found compiler bugs in each and every one of them (Microchip’s C18, HI-TECH (now XC) and CCS). The root cause of nearly all of these bugs has been traced back to the bank switching which is required because an 8 bit processor can only access 256 bytes of memory without switching banks.

    We’ve been forced to switch to PIC24s, which only has 1 compiler and it is a fork of gcc. I have yet to find a bug in it. The PIC24 is a 16 bit chip so it has no bank switching gook to get in the way of accessing 8K or 16K of RAM. The PIC24 spec sheet even states a “C Compiler Optimized Instruction Set Architecture”. After years of fighting with PIC18 compilers for production I can no longer recommend them. If you like MIcrochip, skip straight to the PIC24s. In some cases they are actually cheaper anyway.

    Note that the PIC18 compilers are usually fine if you use them in Lite mode with all the optimizations turned off. However, on anything other than a trivial LED blinky project you’ll need optimizations on and that’s when things go south.

    • I have used both PICS and AVR. Done assembly and C on both. I am now an Atmel freak. (Been in the embedded field for 35 years, now specialize in mission-critical embedded systems.)

      The PIC24 compiler choice is simple: gcc is the only possible choice. CCS is *crap*. I lost 60 (documented) hours of my life to that piece of $%^. (The CCS compiler for the PIC16 was actually reasonable.)

      Atmel toolchains are robust, clean, and just *work*. I use vi for editing because I don’t like IDE editors, but the IDE doesn’t care – it does the autoload if you tell it. The Dragon JTAG/ICP is $50

      I find the Atmel documentation good. Took a while to get used to it (family vs specific chip), but the appnotes are superb. Microchip docs are pretty good. Never had to do an NDA for either.

      I use both the ATMega and ATXMega chips. The ATXMega128A1 is a *sweet* chip we used for a killer app – I loved it. The Xlain eval board is great, and only $35

      The availability of Atmel chips *is* a bit of an issue. I wanted to move from the ATXMega 128A1 to the ‘256A1 and none were available. I made-do.

      The Arduino stuff is *good*. A bit fluffy for a serious down-on-the-iron type, but really good for the hobbyist. Still, I will happily live with the fluff because I can add to it as needed.

      ARMs: If I need to get *serious* horsepower, I use an ARM (ST32F is *sweet*). The toolchain issue an get expensive if you need an IDE. There seem to be free gcc compiler/linkers available, but have not looked at them. (Client bought the IDE.)

      And – since I have one hand (see my name :^) – I like ARM projects because that way I have at least two arms…

    • asdf says:

      Man, you need to expand your horizon vis-a-vis 8-bit processors and their capabilities. PICs belong to the nasty class of processors where all capabilities are essentially exposed implementation details.

  16. Necromant says:

    Oh, come on. STM32 are so far the cheapest and fastest on the market.

  17. Ben says:

    In addition with the MSP430 comparison it’s somewhat unfair to compare, they are less powerful yes, but they have much cheaper dev kits (launchpad) and they are designed for low power.

  18. NoX says:

    AVR has better documentation and existing code & designs for the beginner to piece together into something they desired.

    PIC’s are a tiny bit better performance wise, but harder to get started with.

    So in the end, to get started, there’s AVR.
    Got that nailed down and up for a slightly more rewarding challenge, then pick PIC.
    Well that is if you’re not in the mood for some ARM fun.

  19. bfhben says:

    With regards to comparing MSP430 it’s also somewhat unfair. I’m sure you can’t get a dev kit for either AVR or PIC for $4.30 and the MSP430 series are definitely designed for low power.

  20. SYNTRONIKS says:

    This is the most bullshit comparison between these microcontrollers I have ever read. How can a RISC architecture score less than modified harvard without any explanation? Add that to the archaic requirement for a DIP package and you have a blog post that should have been left to rot in a dank crevasse of the internet rather than be posted on a good intelligent site like HaD.

    • Duncan Gunn says:

      All I can say is this. I use STM32, AVR and PICs but choosing the right one for the job nowadays is often a matter of personal preference. Most projects just don’t need shedloads of expensive and so it tends to be STM32… That is unless I want DIP package.

      The STM32 RULEZ! (Runs round shouting in the street burning rivals on sight).

    • lwatcdr says:

      Umm both chips use a modified Harvard architecture.
      http://en.wikipedia.org/wiki/Harvard_architecture#Modern_uses_of_the_Harvard_architecture
      That is what is a bit insane about that chart. The person making it has not a clue. Harvard architecture means that the program and data memories are separated. RISC has nothing to do with the memory architecture and every thing to do with the ISA!
      Modified Harvard architecture competes with von Neumann not RISC,
      RISC competes with CISC and VLIW.

  21. Addidis says:

    For me its really simple. When I want any given chip Microchip has about 50000 of them ready waiting and able. I can order from microchip direct, get a straight price not worry about fakes etc etc etc.
    You will be hard pressed to find a project that uses atmel that doesn’t have supply issues as a constant issue.
    Pickit2 is 30$ .
    Not being able to debug easily is my one gripe against arduino.
    Nothing is perfect but I figure learning the cheapest option just gives you an advantage later down the road. In the end it comes down to how cheap you can make your widget and if you can get the parts when you want them.

    • Brian Neeley says:

      Here is my personal take on the subject. Take it for what it’s worth.

      You have two basic cost issues: fixed costs and scaling costs. Your fixed costs include your devkit/compiler/interfacing hardware, and ONE chip to play with (the devkit isn’t much fun without something to program (besides, you generally get at least one with your kit)). Your scaling costs include extra chips, and whatever you are plugging the chips into. Everything EXCEPT the extra chips are going to cost about the same (assuming you aren’t having to implement something that the other chip can internalize).

      So, individual chip prices are not going to be a significant issue for the beginner, or small-time hobbist. Assuming a one dollar price difference, and no more than twelve projects a year (I think that would include 90%+ of typical HaD readers, but I could easily be wrong (It might make an interesting poll)); the up front costs will outweigh most other price issues.

      I really think (for most of us), the chip you start with is the chip that you will use most. Some people start with the AVR, others start with the PIC. I think the chip you start with is mostly a factor of ‘How did you get started programming these tiny things?’. The *duino, the STAMP, from school, from kit X… 99% of people wil never learn to program at all. Of that 1%, 99% will never program a microcontroller. Of THAT 1%, 90+% will never program more than one chip family.

      Holy wars only kill the infidels, but both sides call the opposition infidels. I personally don’t want blood on my hands, so I will stop my rambling now.

  22. Josh says:

    I was on #Reprap and asked Kliment aboutthe possibility of using PICs as well. His response: PICsare one of the most open source- unfriendly chip companies he has ever dealt with. The compilers are windows almost-only, and they are bad about giving full datasheets without full NDAs.

    • Duncan Gunn says:

      Just working on setting up mplabx and hitech c on my ubuntu m/c right now

    • Addidis says:

      -IDE and tools run on linux mac or pc
      -All datasheets are on the web all you need to do is search for it on microchips site and the pdf is right there no login needed.
      -The people at microchip are awesome. I’ve never felt like they were unfriendly.

      Granted their compilers have large bits of closed source. They are working on it.

    • GOTHMOG says:

      When I damage my ICD3 Microchip replaced it for free in just a week time. Never dealt with Atmel tho.

    • Dave says:

      > they are bad about giving full datasheets without full NDAs.

      Wait, what? The only place I’ve noticed microchip being a bit lacking is in details of their debug interface. I have news for you, atmel keep their debugging interface (I’m not referring to the programming part of said interface for either) under lock and key as well.

      Maybe they were referring to something else, but it’s such a vague argument.

  23. rj says:

    The moment you said “doesn’t take into account the intangibles” you sounded like a sketchy salesman trying to sell a lemon.

  24. alex says:

    For me, availability of good, easy to use, open source tools and libraries(LUFA FTW) ranks pretty high on that list. In that category the AVRs are pretty strong. I love being able to use apt-get to install my tool-chain. I really like working with AVRs.
    The hardware on the other hand is overpriced and under-powered.

    The PIC32s are fast, affordable and you can use GCC. I’m really happy with the hardware itself. However, the way they handle GCC is really annoying. Optimizations turned off (on what is essentially MIPS GCC with some libraries). With an installer which will only run correctly in unity on Ubuntu (Graphical installer crashes on XFCE and other lightweight window managers).

    I think this old idea of paying for a compiler and IDE needs to die in a fire.
    I felt better about it when the compilers and IDEs where built in house had a lot of engineering hours sunk into their development but when it’s GCC coupled with net-beans or eclipse then it just feels like a cash grab.

    • Addidis says:

      IDE is free.

      • josh says:

        It is now.. Back when I started playing around with embedded systems, I was given a Basic Stamp. It was a one-off from the Microchip dealer.

        Ok.. So I have linux here, and it uses a serial port.. Ok.. The USB serial port cords didnt work. Claimed “They didnt support every feature”. Then I couldnt find a tokenizer to make code nor push it. I finally found one in source, and cobbled it together to work.

        The damn thing didnt follow my code, cause it was in Basic.. Ok, so I can go get a proper IDE…? NOPE.

        I then go after my dad for a proper PIC programmer (had a few lying around). And then I find out that you had to buy the fracking compiler and IDE?! I wanted to PIC my brains out through my eyeballs.

        I hear about this thing called Arduino, and it’s been Atmel ever since.

        • Dan says:

          >The damn thing didnt follow my code, cause it was in Basic.. Ok, so I can go get a proper IDE…? NOPE.

          >I then go after my dad for a proper PIC programmer (had a few lying around). And then I find out that you had to buy the fracking compiler and IDE?! I wanted to PIC my brains out through my eyeballs.

          > I hear about this thing called Arduino, and it’s been Atmel ever since.

          So, basically, you are annoyed that you tried to make it work on an unsupported system, then you’re annoyed that you couldn’t find a free compiler, then you’re annoyed that your code that you wrote in basic didn’t work, and somehow your inability to find free software, your inability to find software to use a serial programmer on Linux and your inability to write code is the chips fault?

          Of course now the tools, IDE/compiler/programmer are free, so everything except whether or not you can write code or not is now a non issue!

  25. Swulf says:

    I ordered a PICkit3 back in July last year and was sorely disappointed. Windows wouldn’t even recognize it and basically nothing worked as advertised. I wanted to upgrade from an older serial Microchip PIC programmer and thought this was the way to go; I was already not too impressed with Microchip’s support but thought, well, it’s been a year or two since I bought my first programmer, I am sure things have improved a lot – I was very wrong.

    Microchip gave me the runaround for nearly two months trying to return the PICkit 3 – once I had got it back to them and received a refund I was a very disillusioned customer. It’s a shame because all I wanted to do was some simple development work and it just turned into a clusterf**k of incompetent product design and feeble support. I do rate their PIC devices highly, but they can’t design development tools for toffee and their support is just useless.

  26. Ray Moore says:

    I see on his site that the particular PIC he chose can run up to 64MHz…however, according to the datasheet the chip still uses 4 clock cycles per instruction on single cycle instructions. This makes the chip run around 16MIPS. The AVR he chose can run at 20MHz with single clock cycle for a single cycle instruction, making it run at 20MIPS. And RISC/CISC is not the same as Harvard/Von Newman architectures. Comparing RISC to Harvard is like comparing apples and cashews.

    Just a side note, I use PIC, AVR, 8051, Cypress, and MSP430 microcontrollers, depending on which one best fits the situation.

  27. Justin says:

    PIC vs AVR: don’t care, just let me develop without external RAM/EPROM like in the haydays of the MCS-51. I hated that stuff.

  28. Desmo_Power says:

    This seems like just the Mac/PC/Linux argument brought to another semi-related product. So far the market (both commercial and hobbyist) seems capable of sustaining all 3, and if I recall correctly none of them even lead the market in installed devices. All have sufficient examples/tutorials to enable neophytes a hand up, and arguably the competition leads to better products, lower prices, and better support. Over simplifying down to 3 semi-arbitrary parts is misleading at best. We’d need an inter-company MAPS to be really useful.

    Unsolicitied observations:
    PIC was a bit late to the C party, and still suffers from fragmented development communities. Great samples program, wide range of devices, documentation and support occasionally lacking though.

    Atmel is arguably most popular for hobbyists, but take away the Arduino product support and Atmel is less dominant. In a time-to-code comparison Arduino would likely win out, but per unit cost would be prohibitive for mass production obviously.

    I’m not incredibly impressed with the outright capabilities of the 430 line yet, but have only really looked at devices that will plop into the 430 Launchpad. The $5 PCB is a great product at 4 times the price. Arguably the most cohesive development community.

    TL;DR, sorry. Short version, all have their place, it’s not a zero sum market, but it is a great time to be a hobbyist or developer.

  29. bbotany says:

    Trying to get a working PIC compiler has made them irrelevant for me. I think I can get one for my work computer, but so far none have worked for me on a personal system (Slackware on 64bit, Ubuntu on PPC, Pi, Beagleboard, and Chumby’s). I’ll consider PIC’s when they have a reliable build chain.

    Somewhere between 5,000 and 15,000 pieces, the cost-for-performance advantages of PIC’s would make them the winning platform for me. Haven’t been there yet, and based on my experience so far, I expect the change to cause a week of pain just for host OS and compiler gnarlies.

    In terms of hardware, I have seen no difference between the two lines worth caring about unless you are already invested in one or the other. They’re Coke and Pepsi: 8-bit corn syrup with a dash of caffeine and ADC’s.

  30. Peter says:

    Well we take Arduino more serious.

    I work in the industrial sector, I just approved to order 5000 Arduino Uno’s including a specific shield, a cost difference so small isnt a factor to us.
    What counts more is the plug in shields factor.
    Ease of programming C++ like a lot of our programs.
    Some shields designs are really clever and robust.
    In our industry soldering is like loosing time, we need to click screw and be ready.
    Code examples on the internet, good public support a great forum superrr !!!
    When we ask something there we usually have a reply within 2 hours !! great.
    And as we ask questions we also help others there for free too

    So Arduino, for us its the real thing, the few cents difference we really dont care.
    It is about software and hardware combine it with a PC and there are almost no limits
    The PC runs our complex software, micro controller talks to it, together a great platform to make industrial sized stuff. Compared to PC price (heavy calculations power pc) its like buying another mouse or keyboard for it..

    And so far we never had one short circuited, just take care on how you deal electronics.

  31. DGV says:

    I do not think I’ve ever seen a more idiotic piece of writing ever…

    1. “RISC” vs “Harvard” is like “apples” vs “oranges”. BOTH AVR And PIC are harvard architecture (as defined by having a separate data and code memories,each with their own bus). “RISC” is a word whose meaning keeps getting redefined over the ages. The most common uses are: (a) very few instructions, in which case both PIC and AVR qualify – neither have complex instructions like string manipulation or division, or (b) load-store architecture. This is a bit more complex, since some pic instruction *CAN* operate on memory, so PIC is not a true load-store arch, while AVR is, but this is not relevant since the author clearly does not even understand this or how to make use of this fact in his comparison.
    2. On PIC, instructions all take at least 4 cycles. This means that a 64MHz PIC really only executes 16 million instructions per second tops. Peripherals are slower yet. A 64 MHz pic cannot do SPI master faster than 8MHz. A 20MHz AVR can do SPI master at 10MHz. This means that pure clock speed comparisons are idiotic to the extreme.

    A smart man would have done the comparison byt writing the same bit of complex code that would test all aspects of the {chip+compiler} system (since that is what people care about), and reported on actual speed-of-execution vs crystal speed. My *guess* is that if you use PIC18-series chips, you’ll need about 25MHz PIC to match a 10MHz AVR on pure number crunching. If you use a PIC10,12,or16, you’ll need 35MHz PIC to match a 10MHz AVR. Peripherals are harder compare, but doable still.

    In conclusion this article falls a few million miles short of being unbiased, a few billion from being correct, a few quadrillion from even making sense, and overall leaves us with a profound understanding of the authors complete lack of comprehension of the issues at hand.

    • jpnorair says:

      “In conclusion this article falls a few million miles short of being unbiased, a few billion from being correct, a few quadrillion from even making sense, and overall leaves us with a profound understanding of the authors complete lack of comprehension of the issues at hand.”

      Yeah, I couldn’t agree more.

  32. Adam says:

    Like plenty of people here, I think that the chip should be chosen for the project. For simple projects, use a PIC, or a PICAXE, which I’ve found has cheaper development set up costs. If you need to prototype something fast, use an arduino, then build it with an AVR chip. If you need to do things with lots of data, use an ARM, or an actual computer. Hackers should be able to PICk (pun intended) up any thing they need to use for a project, and save the arguing for mobile device ecosystems.

  33. jpnorair says:

    MSP430 is a classic CISC architecture, not RISC. TI calls it RISC, but that is an egregious lie from their marketing department.

    • Elias says:

      Care to elaborate? All three Microcontrollers violate a lot of RISC paradigms like register orthogonality, pipelining, load/store architecture and so on.

      • jpnorair says:

        MSP430 is architecturally very similar to PDP-11. To be more specific, it has an ISA of very complex instructions, most of which include memory-memory addressing modes.

  34. jc says:

    Let’s see.. avr-gcc ? check. Open source programmability? check. Vastly superior peripherals? check. The only way you’d use pic if you don’t mind using windows and need to get a bad MCU very cheaply.

  35. Queeg says:

    Article is completely wrong. vi rules.

  36. Swulf says:

    So, I am unfamiliar with Atmel AVR; what in your opinion(s) are the best way to become familiar and get some productive work underway quickly? I am familiar with gcc, C/C++ and PIC. What AVR tools do I need?

    • Elias says:

      Get some cheap Arduino clone off ebay, you can get some for less than $20. Once you are fed up with the Arduino environment you can use Atmel Studio with AVRGCC to program the Arduino hardware.

      The hacker way would be to get a cheap USBasp clone (<$5), a few DIP AVRs (Atmega88/168/328 may be a good start) and a breadboard. You can use avrdude and AVRGCC or Atmel studio if you want a GUI.

      • Swulf says:

        Thanks, I’ll look into those.

        • If you are not hung up on “open source” (not a political statement), and need USB, the simplest is a Teensy 2.0 or 2.0++. They supply the AVR code for the USB, and the host-side driver. Makes the board look like a generic HID with 50 byte packets. Two flavors (the ++ is the bigger) for $14 and $26, and you can use the Atmel toolchain and the Teensy loader, or make it look like an Arduino. http://www.pjrc.com/store/teensy.html – just a satisfied customer. The 3.0 uses an ARM, but no experience with it.

          (The bootloader is closed source, and the hardware is explicitly *not* open source, although you get full schematics and there is nothing special about the design – just an ATMega with a USB attached. I think they bit-bang the USB, so it’s not (verify this) 2.0 speeds.)

      • Swulf says:

        ‘cheap USBasp clone (<$5)' – ha, yes, $4.36 incl. shipping on ebay… =)
        Ordered.

  37. jwrm22 says:

    I’m using PIC, just because i have started with them years ago. (Started with Basic, Flowcode and later “Just Another Language”). 8-bit is enough for most applications, suggesting ARM is better just for being faster doesn’t do it for me. Running normal 24/7 application will just work fast enough on 1MHz and some even on 32kHz.

    I’ve never ran an AVR and there is at this moment no reason to do so. If my future job-side just uses another micro, I’ll just have to learn it. Its not too hard after 2-3 weeks we got the STM32F4 to do some complex stuff, after 6 months we’ve mastered it. (DMA is great but pretty complex to get started with.)

  38. Taylorian says:

    PIC, PICAXE, AVR, Arduino…Whatever. Use the one that you are comfortable using and best suits your needs. At the end of the day, to say one is better than the other is purely subjective. It all boils down to getting the job done.

    Myself, I learned a ton about PICAXE in the last few years, But I would take the time to learn AVR or Arduino if I needed the capabilities. I will naturally gravitate toward PICAXE when I can…due to familiarity. I can whip up most basic designs in my head with them.

    I will say that price has kept me away from Arduino as a matter of course.

  39. MrTroll says:

    6502 ftw you can keep yer Z80…. (sound of troll running back under rock).

  40. mikeselectricstuff says:

    For production, things like availability can be much bigger factors than technical differences. Microchip has always had good availability, and typically several pin-compatible alternatives. Another big benefit is they will supply chips programmed and marked for a few pennies extra – way cheaper than most 3rd party programming services

  41. macegr says:

    I use AVR because of GCC. That’s it.

  42. WestfW says:

    What strikes me about the article, aside from the general cluelessness (completely missing the 1 clock vs 4 clock instruction timing?) is the “locality of pricing. AVR was dinged for being “overpriced.” Yet in the US, looking at both Mouser and Digikey, the ATmega328 was cheaper than PIC18F25K80…
    Are PICs really less popular with microcontroller hobbyists than AVR? I would have put them at about even, once you exclude Arduino (because (Important Point!) a lot of arduino users aren’t “microcontroller hobbyists.”)

  43. wulfman says:

    get some real balls ( bga ) and use a TI sitara AM335x ARM® Cortex™-A8 Microprocessors (MPUs) no fun if you done learn anything new

  44. NewCommentor1283 says:

    (TROLL)
    trollbait article gets trolled. lol

    PS: Sony or RCA ??? SonCA :P

  45. George Johnson says:

    Funny how, in the previous post, they had a cool project using the PIC. Then they (HAD) say they’re pretty much worthless.
    This is like so many other things, it depends on what you want to do, and what your point of view is, and your experience, past and present…. your background….
    It’s a LOT of personal opinion, and many times, you may never change an opinion.
    Personally, I use what ever I can. Does anybody really stick to just one processor??
    (Could be, I pretty much got banned for suggesting on an electronics magazine forum, that they have more projects using other types of processors (they ONLY used PIC). They did NOT like that suggestion at all!!)

  46. LordNothing says:

    the only reason i still use avr is because i own all the stuff neccisary to dev on one. if i were to switch to pic or some other platform, id have to buy all that stuff again.

  47. JD says:

    Nice to see the Basic Stamp is still remembered! It was my first experience with micro controllers and digital electronics in general. Functionality-wise, the thing was pretty mediocre however I cannot help but get nostalgic over it. For me, it came on this little robot kit called the Sumo-Bot from McGraw-Hill that I got to put together when I was 10. Still remember the hours of fun I had with that doing pretty much the equivalent of blinking leds on an arduino today.
    It amazes me how they still sell it for a whopping 50 bucks today. But yet I want to buy one just so I can remember what it was like making those RC circuits just to read analog values. What a bloody pain that was…

  48. Frank Cohen says:

    PickKit2 is no where near $50. That is for the starter kit. The programmer itself can be had for $25 and you can buy DIY kits for $5-$10.

  49. Pete says:

    I wish I could easily code & program avr on mac. Does anyone know of a tutorial to get a dev environment up and running on mac? Something similar to avrgcc and Programmers Notepad on windows where I can write code, click Make and click Program to invoke avrdude.

    • asdf says:

      The tools are all available via Macports. Do yourself a favour and learn how to write Makefiles and work from the command-line, you will become far more self-sufficient (and if you really want to you can then script any capable editor you like).

    • WestfW says:

      Well, for AVR development on Mac there’s Arduino, including a version integrated into XCode. And “CrossPack-avr” for mostly command-line usage (more or less exactly eqiv to “winavr”, only more up-to-date.”

  50. Elliot says:

    Crap. Out of popcorn

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 91,390 other followers