Start learning microprocessors

Thread Starter

ray242

Joined Nov 27, 2016
44
Hi, I'm an EE student and I want to learn about microprocessors and use them in my projects in future. Could anybody suggest me something to start with? Is arduino good for starters?

Thank you very much in advance.
 

JohnInTX

Joined Jun 26, 2012
4,787
Arduino is fine to start with - easy to learn and lots of good tutorials that are hard to goof up.

PIC is more bare metal although they are moving towards some high level programming tools (Harmony, Code Configurator).

Either way, your microcontroller education needs to incorporate the software disciplines i.e. learning the architecture, a language (C, assembler), data structures, IO hookups and, most important, how to understand and define a problem, solve it on paper then implement the solution in code. Don't fall into the trap of searching the internet for solutions. A scan of current and past threads here and on other forums will demonstrate the fallacy of that approach.

Stay in touch. Good luck!
 

noweare

Joined Jun 30, 2017
115
I would go with arduino. I am an EE also and IMO you can probably get up to speed quicker because of the examples and community support available. You can use the arduino libraries or use straight C as you get to know more about the chip and software. You will not be disappointed.
They are also very inexpensive. You kids have it good these days. When I was getting started all the boards, simulators and software cost a lot of money. Now they give the stuff away. : )
 

dendad

Joined Feb 20, 2016
4,637
I would second the Arduino vote. Very easy to get into and lots of help around.
The boards I make use dsPICs and PIC32 chips but Arduinos are easier to start with. When you learn enough to get a bit frustrated with the Arduino IDE, you can move to better ones but you cannot beat it for a learning tool.
 

simozz

Joined Jul 23, 2017
170
I want to learn about microprocessors
Hello,
Keep in mind that PIC are micro-controllers (as the ATmega(s) used by Arduino), not micro-processors.

If you are interested to micro-controllers, since you are a EE student and you have to prepare yourself professionally, I would suggest PIC instead of Arduino for a few reasons, but the most important since PIC are used professionally.
Who uses Arduino professionally ?

simozz
 
Last edited:

dendad

Joined Feb 20, 2016
4,637
Who uses Arduino professionally ?
While it may not be "professional", most 3D printers are Arduino based. And there are a great deal of "Arduinos" used professionally.
After all, they are just an Atmel micro controller with a boot loader to make it easier to use.
Atmel chips are in huge numbers of embedded applications.
We are talking about learning programming and the Arduino is by far the best to start with for controlling hardware. If you want to go to screen based sort of stuff, then the Raspberry Pi is the go, for the same reasons as the Arduinos. After all, both there products were designed AS teaching aids so the support is very good for that.
Next I'd say ARM based micro controllers, and probably skip PICs unless you have a need for them. Even so, as I said above, my boards are PICs and that are great chips. But the learning curve is a little steeper when starting from scratch while Arduino has such a great ecosystem to help get into it. I just can't understand the bias against Arduinos in this forum. They are not the best for all uses but as a learning tool, PICs don't come anyway near them.

And I really wish Microchip would do a 80Mhz upgrade to the Atmel parts now that they own Atmel. Then I'd upgrade my 3D printers with minimal code change!!!!
 

simozz

Joined Jul 23, 2017
170
dendead said:
We are talking about learning programming and the Arduino is by far the best to start with for controlling hardware.
As a starting point, Arduino introduces you to use its own libraries (based on GNU avrlibc) without reading a datasheet, and connecting LEDs to MCU pins without resistors.

I think it's far better to start using GNU avrlibc with a datasheet, and connecting LED with resistors, and being able to use every atmega mcu without arduino ide but with standard professional tools. :)
 
Last edited:

OBW0549

Joined Mar 2, 2015
3,566
I'll add my vote for the Arduino as a minimum-pain place to start with microcontrollers. They're cheap, plentiful, there's plenty of support and sample code available on the Internet (including in the user forums on arduino.cc), and the board gives you a complete (although bare-bones) functioning system to work with. If you get one, get an Arduino Uno R3; that's the one used by the vast majority of people, and it's the one for which there's the most sample code and user assistance available.

But don't spend too much time with the Arduino; once you're comfortable with it, move on as soon as possible to PIC, ST, TI, and whatever else is out there these days. And become familiar with as many different microcontrollers as you can, as soon as you can; one is not enough.
 

dendad

Joined Feb 20, 2016
4,637
Yes indeed. And get a full set of programming languages too. My son is a professional programmer and he started with BASIC. Now he is fluent in many languages and architectures. I nod wisely when he tells me what he is doing, mostly ;)
I've not said to stay with Arduinos and I think most, other than hobbyists, would get into more pretty quick. But, like tonight, my granddaughter was thrilled to get to change the colours of a ring of LEDs. She is going to design a ring LED light to go around her camera lens for her stop motion movies. It will give her variable lighting and camera remote control. I'll be helping her, but she will have to learn Arduino programming, electronic wring, 3D design and then 3D print all the bits. Without the Arduino as the controller to run it all I don't think she would be interested. As it is, she is very excited at what she can get it all to do, and now will be planning the functions she wants to include.
 

OBW0549

Joined Mar 2, 2015
3,566
And get a full set of programming languages too.
Including, in my opinion, assembly language.

Though you may end up doing most of your work in C, C++ or whatever high-level language, assembly language puts you in much more intimate contact with the hardware: it forces you to really understand the hardware architecture, read and understand the MCU's data sheet, and understand the MCU's on-chip peripherals in a much more intimate way than you will achieve by performing methods and calls to some pre-canned C library.

So don't exclude assembly language from your repertoire.
 

DickCappels

Joined Aug 21, 2008
10,661
I would also suggest starting with a microcontroller and assembly language over starting with a packaged solution such as Arduino. Arduino was designed to replace the old Basic Stamp which was a tool that allowed students (and particularly not EE students) to use microcontrollers in their projects.

Using tools like that are a lot like smoking. Maybe only a little work to get started but very difficult to stop.
 

OBW0549

Joined Mar 2, 2015
3,566
I would also suggest starting with a microcontroller and assembly language over starting with a packaged solution such as Arduino.
I'm torn two ways about that. On the one hand it's true, as you say, that an Arduino or other packaged solution can be addictive and that some users will resist moving off it and learning how to design their own hardware suite.

On the other hand, I think that anyone who's truly determined to learn embedded system design will take that step naturally in fairly short order.

Regardless, I think it has to be acknowledged that once you start designing your own hardware and writing your own code to go along with it, you are truly on your own in uncharted territory. If a person is already well-versed in electronics, that uncharted territory becomes familiar fairly quickly; but for a beginner still at the "what is a microcontroller?" stage, starting out by designing something from the raw chip up can mean climbing a VERY steep learning curve.

@ray242: I'd say get an Arduino and allow yourself a month or so to play with it, no more, then move on. (Your money spent on the Arduino won't be wasted; I have several, and use them once in a while for small, "quickie" tasks like checking out some new peripheral chip or sensor. Arduinos are handy for that.)
 
Last edited:

dendad

Joined Feb 20, 2016
4,637
Assembler is great :)
My first computer was a Signetics 2650 system and it had a "glass typewriter" terminal. I had to program it by working out the program on paper from looking at the instruction set docs and then typing in the hex codes. I can still remember...
3f02b4
Branch Subroutine True Absolute Unconditional (3f part)
Character Our Routine (02b4 address)
But, it was pretty hard and it took a long time to get things done. My efforts to write the code for a memory mapped Video Display built on Verro board took ages. But it was really a big deal to get it all working. Assembly code gives you a very handy insight to what is going on down deep, and can really be a great help even understanding how to get the best out of high level languages.
 

dendad

Joined Feb 20, 2016
4,637
Oh just another thing for Arduino, I use them in my electronics class, and can buy one on EBay for $6 AU. Nothing else to pay. That is hard to beat. I'm not able to get a PIC, board and programmer for anything like that.
 

OBW0549

Joined Mar 2, 2015
3,566
Assembler is great :)
I've always worked mostly in assembly language; I'm comfortable with it, I can work quickly and accurately in it, and it has suited my needs for the kind of small, fairly simple embedded projects I've done over the years. For anything more complex, though, I'd have preferred C, though I don't particularly like it.

My first computer was a Signetics 2650 system and it had a "glass typewriter" terminal. I had to program it by working out the program on paper from looking at the instruction set docs and then typing in the hex codes.
Hrrumph. :( Back when I started, with the Intel 4040, we didn't even have any of that newfangled stuff like a terminal; we had to punch in the hex code on an EPROM programmer straight off our coding sheets and burn a 1702A EPROM, and hope for the best.

Assembly code gives you a very handy insight to what is going on down deep, and can really be a great help even understanding how to get the best out of high level languages.
Agreed, 100%.
 

MrChips

Joined Oct 2, 2009
34,807
I've always worked mostly in assembly language; I'm comfortable with it, I can work quickly and accurately in it, and it has suited my needs for the kind of small, fairly simple embedded projects I've done over the years. For anything more complex, though, I'd have preferred C, though I don't particularly like it.

Hrrumph. :( Back when I started, with the Intel 4040, we didn't even have any of that newfangled stuff like a terminal; we had to punch in the hex code on an EPROM programmer straight off our coding sheets and burn a 1702A EPROM, and hope for the best.

Agreed, 100%.
Like you, my first experience with microprocessors was having to program an RCA 1802 by hand with pencil and paper and programming a 1702 UV-EPROM. When your code didn't work you had to wait 45 minutes in order to erase the UV-EPROM with a UV lamp. Progress was slow.

For a new EE student, my recommendation would be to learn ASM first. It doesn't matter which MCU you select. Just jump in and get your feet wet.

My personal choice would be one of the following platforms, in no order of preference:

Atmel AVR (now owned by Microchip)
Freescale 9S08 (now owned by NXP)
TI MSP430 Launchpad (still owned by TI)
 

OBW0549

Joined Mar 2, 2015
3,566
Like you, my first experience with microprocessors was having to program an RCA 1802 by hand with pencil and paper and programming a 1702 UV-EPROM. When your code didn't work you had to wait 45 minutes in order to erase the UV-EPROM with a UV lamp. Progress was slow.
Oh, my. That brings back bad memories-- literally. We had one 1702A that simply would not erase: one of the bits in one of the 256 bytes was simply stuck on "0" no matter how long we left it under the UV lamp. But with a magnifying glass you could see why: a speck of dust on one of the memory cells. A light rap on the table dislodged the dust mote, and we were back in business. Which was a good thing, since those chips went for $35 each at the time-- and that was in 1975 dollars.

For a new EE student, my recommendation would be to learn ASM first. It doesn't matter which MCU you select. Just jump in and get your feet wet.
I can't argue with you very strenuously there, though I still feel that starting out with an Arduino-- for a short while-- has some benefits.

My personal choice would be one of the following platforms, in no order of preference:

Atmel AVR (now owned by Microchip)
Freescale 9S08 (now owned by NXP)
TI MSP430 Launchpad (still owned by TI)
My oldest son has the Launchpad, though he hasn't used it much lately since he discovered large FPGAs. :eek:

For about the last 15 years I've been using PICs exclusively. I don't do much with the PIC16Fs or PIC18Fs anymore, though: I mainly use either the extreme low-end PIC10F or PIC12F stuff (very much fun to play with), or the dsPIC30F3013 or the dsPIC33EP64GP502. The dsPICs are especially "assembler-friendly" due to the large register set and very comprehensive and orderly instruction set; but they'd be a bit much for a beginner to grapple with. Counting the chip data sheet, the dsPIC Programmer's Reference Manual and the dsPIC Family Reference Manual, there's upwards of 3,000 pages of documentation to slog through and that's perhaps a bit much. Nevertheless, I've found them VERY easy to use.
 

MaxHeadRoom

Joined Jul 18, 2013
30,655
Or the PDP8 for running a CNC machine Lots of 'Fun'
Became the best selling computer in the world after introduced in 1965 and cost $18K !!
Magnetic memory where you could actually 'see' a bit of memory.
Just couldn't do any Stick welding within 10ft of it.:p
Max.
 
Top