Confusion between Arduino and PIC, Which one is better for learning?

djsfantasi

Joined Apr 11, 2010
9,237
Now you do not Have to learn Assembly, but I somehow think those that do not become at least a little familiar with Assembly never really learn the 'natural' language of the device! :rolleyes:
If the natural language of the device is what you’re after, then try coding in machine language! Nothing but bits.
 

djsfantasi

Joined Apr 11, 2010
9,237
Actually you did with some of the PDP8, some had a row of 12 (bit) toggle switches on the front!. o_O
i know, but I did it with the DECSystem 20. A hybrid of a PDP11 as a front end and a DECSystem 10 central processor. The bootstrap code was on the hard disk which had failed. Needed to bootstrap with the console switches.

Also used machine code on an IBM 1130. It had the bootstrap code on a color coded punched card. Got several blank cards and wrote a short machine language program to loop and print “NOT A BOOT CARD” on the console, until the operator found a real one.

But I got this thread off-topic. Returning to the TS question now...
 

sagor

Joined Mar 10, 2019
1,053
i know, but I did it with the DECSystem 20. A hybrid of a PDP11 as a front end and a DECSystem 10 central processor. The bootstrap code was on the hard disk which had failed. Needed to bootstrap with the console switches.

Also used machine code on an IBM 1130. It had the bootstrap code on a color coded punched card. Got several blank cards and wrote a short machine language program to loop and print “NOT A BOOT CARD” on the console, until the operator found a real one.

But I got this thread off-topic. Returning to the TS question now...
Try programming on an old IBM 1800. It had 3 registers, one of which was the stack pointer. I had to do some assembly in that machine to communicate with a PDP11. I got it to fit in about 400 bytes of code, out of the 1100 bytes or so free ram. But yes, we digress somewhat.
As for original question, a lot depends on what programming languages you are comfortable with. I always had trouble with C and its variants. Assembly, Fortran and Basic are what I used and still can. The fact that Arduino has lots of libraries makes it easier for those that can manage C (or learn it). I use Arduino for some projects but depend on other people's code which I can modify.
My main go-to for very small projects is the older PIC series (16F), and I use a Basic compiler to program those. There are a few different Basic compilers, some commercial, some free. I use Oshonsoft Basic, but have also looked at Swordfish, Proton and GCB (Great Cow Basic). GCB is free. As long as one understands the PIC internals like timers and UARTs, you can do anything with those Basic compilers that you can do with "C". All the Basic compilers allow insertion of assembly code, if necessary.
Evolution of these micro systems continues, and they get more powerful every year. Use what you need for a project, small or big, depending on your needs.
If one has not learned much coding to date, start with the Arduino (in my opinion) due to the large support base and tons of available code that already exists
 

geekoftheweek

Joined Oct 6, 2013
1,429
As a hobbyist with no formal education and figuring out everything from the internet I would say it really depends on what you want to learn and what you want to do with it. If you just some basic I/O for personal projects Arduino may be the way to go. If you want to get into the more complex and different features of the microcontrollers then you are better off ditching the Arduino platform and setting up for the Atmel chips the Arduino is based on, PIC, or any other of the many microcrontroller families out there. The PIC datasheets are generally easy to read and understand along with plenty of examples online and helpful forums. I've glanced at a few Atmel datasheets and they seem pretty good also along with several forums to go to for help.

The Arduiono IDE can be used for a few other non Arduino boards which can help get started with other boards without having to search out, download, and set up multiple tool chains to get other boards or controllers working. Although I want to use the Espressif SDK for my next ESP8266 project I would have never finished the first project in the time I did without the Arduino IDE and examples online. Even with using the Arduino IDE there was a pretty good learning curve to overcome.

I have yet to do anything in C with a PIC. When I first started messing with them there wasn't any good C compilers for PICs on Linux. MPASM wouldn't even work on Linux at the time. I found the gputils and started from there. I like assembly better myself for the absolute control over everything, but would never dream of using it for an ESP8266 or similar type board.

Another point to ponder is programmers. A PIC uses a dedicated programmer while I believe the Atmel chips along with several other microcrontroller families use a basic FTDI type USB to serial converter.
 
Last edited:

ElectricSpidey

Joined Dec 2, 2017
3,353
I don't think it matters which one is chosen or any other that isn't part of the choice.

I see many people coming to this site who have started with an Arduino, and haven't learned a darn thing, because all they do is go online and grab some sketch that might do the job, and have no clue as to how to modify it to their use.

I started in micros using the PSoC platform, because my health and eyesight is now very poor, and I wanted to continue to create my lighted displays, but the board building is becoming very difficult.

So PSoC gives you the opportunity to replace complex logic circuits with its built in FPGA, but as soon as I started to use the platform I got the itch to go further and start programming in C++ so this is where my point is leading to...

I started to take an online course in C++ programming...and that is how you learn, not by picking one platform over another.
 

BobTPH

Joined Jun 5, 2013
11,609
Yes, there are good reasons for learning HLL first. But failing to learn ASM at some stage could hinder your development into embedded systems.

(As an aside, how does one understand pointers in C without grasping the concept of indirect addressing?)
When took my second programming course, which was Univac 1108 assembly language, the teacher had us do our first program using address modification. That means modifying the address portion of instruction to address different memory locations. Then he told us never to do that again.

After that, it indirect addressing seemed easy to understand.

Bob
 

djsfantasi

Joined Apr 11, 2010
9,237
Before learning indirect addressing, there was an indexed array of indices to an array. After that, indirect addressing was easy to understand.
 

MrChips

Joined Oct 2, 2009
35,017
Is Arduino easy to learn or PIC?
That is like asking is it easier to drive a VW Beetle or a horse and buggy?

Is it natural human behaviour to always choose the easy route?
Why not try one? Then try the other?

How does one learn to swim? You start by dipping your toe in the water.
 

Deleted member 115935

Joined Dec 31, 1969
0
Is Arduino easy to learn or PIC?
Ive known two people who never programmed before, get Arduinos working nicely, writing there own code just with the on line tutorials,

If you have the will to learn , then an Arduino gets something on screen very quickly, and you then modify and learn
The tools are all well controlled and just work ( on windows anyway is all I can say )

PIC's, can be great, but I have known many people who have started on PICs, worked through tutorials, just could not get the tools to work, There are many different tools you can use, some for only a certain PIC, and when they did with some help get it running, soon ran into the wall of , nothing happening that they could see.

If you want to be "pure" and have the stamina, go for PIC, you will become a great programmer with real great deep knowledge,
but if like most of us, time is a thing, and fun is wanted, go for an Arduino,
 

BobaMosfet

Joined Jul 1, 2009
2,211
Hi I am new in this field and want to learn programming for Embedded but I am confused between arduino and PIC, which one is better to learn for carrier growth and as per industry demand?
Embedded is no different than programming for a PC- you just have to manage your resources differently. Learn C, and some assembly along the way is truly useful, and go with PIC or ATMEGA. Learn how to read datasheets properly, and understand that it isn't going to be easy. If you simply want easy and to play around before moving on to something else- go Arduino. Arduino is not a 'production' solution- it's an educational toy. IMHO.

Title: Understanding Basic Electronics, 1st Ed.
Publisher: The American Radio Relay League
ISBN: 0-87259-398-3

Title: Standard C [Quick Ref]
Author(s): P.J.Plauger, Jim Brodie
ISBN: 1-55615-158-6

Title: Algorithms in C, 3rd Ed. [Parts 1-4, Fundamentals, Data Structures, Sorting, Searching]
Author: Robert Sedgewick
ISBN: 0-201-31452-5
 

MaxHeadRoom

Joined Jul 18, 2013
30,772
You could liken it to learning a craft or bypass the learning curve and go for a kit.
For example, if wanting to learn woodwork, you might pick up a few tools and oak lumber from H.D. and with the help of craft manuals learn the trade.
Or you could go to Ikea and buy a box of parts that just needs an Allen-Key and one instruction sheet to assemble. ;)
And basically end up with the same thing!!
Max.
 

DickCappels

Joined Aug 21, 2008
10,662
When counseling a graduate student who was tempted to dive into Arduino before learning about what lies underneath it, I felt like a father counseling his son to stay away from dope (my real life son does not partake!). Arduino, as mentioned earlier is a simple systems for non-EE and non-computer science students to incorporate a microcontroller in their project. It was developed as a lower cost replacement for the Basic Stamp computers that were popular 25 to 30 years ago.

If you want to really understand what you are doing, learn assembly language first and then if Arduino makes sense to you, go for it, but more likely you will gravitate toward C (which can get you a job!) and which gives you all the power of Arduino plus a lot more.

Rhetorical question: What is the ratio of professional C programming jobs to professional Arduino jobs? : -)
Answer, we had many professional C and assembly language programmers when I worked at Apple, but only one guy in the industrial design department (Jony Ive's department, the guys who described how the product should look and eventually how it should work) who would use a Basic Stamp to demonstrate his concepts. None of his code was ever used but his ideas were.
 

djsfantasi

Joined Apr 11, 2010
9,237
People who use Arduino’s minimize the complexity of the platform. You still need to know or learn basic electronics. Arduinos do not replace what you need to know, but do make the introduction to microprocessors simpler.

People who use PICs (and other platforms) minimize the complexity of the tools. PICs and other platforms are appropriate for a production or commercial solution.

This is in itself, an oversimplification. So there are difficulties either way. If you are new to microprocessors and electronics, start with an Arduino. And keep in mind the situations where it is appropriate to move to another platform. I have coded an Arduino with a run-time system for animatronics. But the second generation will be a custom board using another platform.
 

BobTPH

Joined Jun 5, 2013
11,609
Would people stop comparing Arduino to PIC. That is like comparing a car to an engine.

If the question is, should a beginner start with a chip and make his own board vs staring with a pre-made, ready to go board, the answer is easy (for me at least.)

If the question is between and Arduino and a PIC development board, then that is different.

If the question is between an PIC and an AVR chip, that one is a tossup, they will be pretty much equally difficult to get started with.

Bob
 
Top