why arduino over PIC? Why PIC over arduino?

Hello,

I'm hoping for a compare and contrast. I'm no stranger to a soldering iron, have a nice collection of 555's and various transistors, make my own circuits, etc. My applications almost always involve Input/output control to integrate certain devices with other devices such as power window behavior modification or remote start integration. (95% automotive applications)

I'm no electrical engineer though.

It is soon time to begin experimenting with microcontrollers to make more sophisticated devices. I can go either the PIC direction, or the arduino direction. As far as I can tell, the differences are:

PIC - cheaper arduino - easier

Where I almost have to do no circuit design or even construction with the arduino, and no programming more complex than I'd have to do for an HP calculator.

Not sure what is involved programming a PIC compared to arduino, but the chip cost is a couple bucks (after programmer costs) which is pretty nice. widely available, I can buy PIC chips locally in a pinch, which which I can not do with arduino.

Are there any other advantages or disadvantages to either choice besides what I've outlined already? I'm leaning toward arduino at the moment because it seems far more user friendly. But at $19 plus shipping per circuit plus a prototyping arduino for testing, that's kind of a drag! especially if I can get equivalent performance for $5 a pop plus an extra few hours of reading...

This is an Arduino forum, so the answer is "Duh, AVR all the way man!"

And there are reasons for that. Since Arduino, the microcontroller world has become flooded with AVR code. PIC was the platform of choice in undergrad microcontroller classes for years, but even in this dusty hallway of technology, AVR is making headway. The shear amount of code and support bend the argument toward AVR.

Then you get into the programming. Do you remember the "good old days" of 8085, Z80 and other 8 bit dinos? Pic programming more resembles that kind of structure, where to to do an operation, you had to two-step it: move the number into a register, then do the operation. With AVR, all that is done in a single instruction. I don't know for sure, but I think the "C" of PIC stands for CISC, while the "R" of AVR means RISC. Complex vs reduced. Which sounds cleaner to you?

By the way, both PIC and AVR are made by the same company, Microchip. The engineers who make them must therefore some advantage to having both. Probably so that AVR looks even better.

The cost of PIC devices is irrelevant since you’re not buying 10,000 pieces.

PIC = closed source and pricey tools. No real support for the hobbyist. Check out their forum for yourself. Pretty pathetic IMO, lots of unanswered posts.

AVR (Arduino) = Open source, great free tools. Tons of support, libraries and code examples. You have the forum here as well as AVRFreaks.net.

Next question?

An Arduino is a "development board" and an ecosystem. A "PIC" is usually just a chip. If you compare boards to boards, or chips to chips, the prices are very similar, and the Arduino Ecosystem is much easier for a beginner to use.

I'm with WattsThat.

After using both systems over the years the AVR is a lot better community supported than PIC but you can program some PIC chips using Arduino (one example here). It really comes down to what you want to do with the hardware and if the MCU supports what you want. As an example the PIC can do very accurate time measurements using CTMU but on AVR I had to use external chips to get accurate timings.

Comparing Arduino to PIC makes no sense. It’s like asking “What’s better, a town or an orange?”.

The term “Arduino” is used to refer to many different things: Development boards, a company, an IDE, an API, a community.

By “Arduino” you might mean a development board. Maybe you mean only official Arduino hardware? Even then there are several architectures. Then you have the many 3rd party boards, which add on even more architectures and price points. In fact the ChipKit boards use PIC microcontrollers and are designed to appeal to the Arduino market. That’s right, you can program PIC microcontrollers with the Arduino IDE.

Many people are under the mistaken impression that Arduino == AVR. This is absolutely wrong. AVR just happens to be the architecture used in the first Arduino boards. Most recent official Arduino boards use the SAMD architecture.

As a beginner, you will have an easier time if you use the more popular chips because they will have the best community support. The AVR has the best support simply because it’s been around the longest. The SAMD support is getting pretty good. The ESP8266 support is probably the best of any of the 3rd party options since it’s very popular and fairly mature now. If you chose an option not as commonly used by the Arduino community, such as the PIC32, you will find less online information, less pre-written libraries and code, and less people who have experience to answer your questions. With enough perseverance and time, you will be able to work with whichever part you chose.

just got my pop corn ready

The biggest difference is that there are lots of free/open source tools for AVR (such as Arduino), but not for PIC.

The PIC chips are cheaper for a given level of capability, but the AVRs are considerably easier to develop for, in terms of the tools available to hobbyist, the size of the community that uses them online, and IMO the overall design of the peripherals (though the parts with the new peripherals are a lot more complicated).

Arduino is a framework and IDE that makes development with AVRs (and SAM) parts a lot easier (especially within the AVR line, almost every part you'd want to work with is supported by an available third party hardware library, and you get easy shortcuts for using the peripherals, and nice libraries for everything. And a thriving online community. What I particularly like about Arduino is that as you get more experiences with AVRs (and other supported chips - but AVR is much easier to get to this point with), you can use as much or as little of the arduino abstractions as you like.

Noting that the OP does not have a history of actually becoming involved in discussion, I nevertheless ask myself - why am I in Arduinos, more than 10 years (?15 ?more) since I started with PICs?

Was it the use of "C" rather than assembler? No, I am perfectly at home with assembler, I can think in terms of registers (and pointers), "C" I have found more obscure. :astonished:

Was it the IDE? Well, perhaps. Click to download is pretty straightforward.

Was it the cost of chips? Sort of. Since I played with PICs - and I actually did not do much with them myself, perhaps became more involved in coding for others on the PIClist - chips have become a trifle cheaper.

The scale of chips? Well, the Atmega328 is certainly a few steps up on the PIC16F84 though there are no doubt, comparable PICs of comparable price. Aren't there?

Frankly, what it was, was the Arduino. Yes, there were PIC boards - the Stamp of course; I have a couple squirreled away somewhere here - but the Arduino is not a chip; it is a working module, you plug it in to USB and use it. It might be, it could be with PICs, but I have not heard of it. You need the software (may need to pay for it), a programmer (do need to pay for it!), you need a board, support components, terminations etc.

Now let me be clear - I am thinking in terms of the Chinese knock-offs; the "clones". They are consumables, "burners" (but I have not "burnt" one yet in that context), little danger of costly mistakes. My first purchase was actually a Leostick from Jaycar and I think, an Etherten (because: connectivity) but the Leostick (Leonardo/ Pro micro) does not want to play ball with programming so was put aside with the Etherten. Very pretty though!

My first work was with Pro Minis and USB adaptors. Now I mostly use Nanos for convenience, or of course, WeMOS D1 Minis. These are the "workhorses" for anything serious, the Nano if Internet is not needed, the WeMOS if it is; no mucking about with Ethernet "attachments". I do have a genuine UNO SMD, and some clone UNOs and Mega2560s but I do not consider them useful.

Considering the price in particular, I cannot see anything PIC that compares to the Nano (not to mention those other things - STM32s - just haven't got around to setting them up and trying them out; more things in the trophy cabinet!)

I think it is also worth considering to learn ARM. Today ARM microcontrollers are much more powerful and have much better peripherals for nearly the same price as 8 bit MCUs. But it is also ARM's weakness - I am not sure if it is possible to understand all the features without "simple" AVR (or PIC) "introduction".