Author Topic: Which microcontroller should I learn?  (Read 34929 times)

0 Members and 1 Guest are viewing this topic.

Online blueskull

  • Supporter
  • ****
  • Posts: 13186
  • Country: cn
  • Power Electronics Guy
Re: Which microcontroller should I learn?
« Reply #25 on: February 08, 2016, 03:15:26 am »
1. If it works, it is good. That's my rule of FAST prototyping. I do not use Arduino in products.

yes, and forget to be employed in avionics, for example

Thanks. I'm talking as a hobbyist and commercial engineer, not an avionics engineer. I know how to design fail safe and fail operational systems.
The professor gave me IEC61508 seminar works on safety system of Chinese rocket systems and Huawei large scale telecommunication systems.
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6004
  • Country: us
Re: Which microcontroller should I learn?
« Reply #26 on: February 08, 2016, 03:33:38 am »
3) arduino doesn't have the concept of "module"

Can you explain?

Since Arduinos are programmed in C++ you can modularized in several ways, separate .h files,  namespaces,   classes and even use the arduino library facility.

OP, if you want to show experience that will help you get a job, I would go with ARM. Your employer will assume that you can also learn AVR, PIC and the like. It doesn't matter much which vendor you choose, just pick a popular dev board and go from there.
Drain the swamp.
 

Offline Morgoroth

  • Regular Contributor
  • *
  • Posts: 123
  • Country: cl
Re: Which microcontroller should I learn?
« Reply #27 on: February 08, 2016, 04:24:06 am »
Important stuffs you must learn are things commonly used for all MCU (not only ARM), and are all, or mostly all, different for each chip, and must be managed by hand (the 'macho' way) or through IDE (ladies way).

Core is not so important, because the vendor will give you libraries with all complicated details to use the features of the chips, learn the 'basic' and then involve with more complicated details over architecture.

libraries managment : each time you select a MCU you will have an SDK (a bunch of library) and you will configure your IDE or Makefile to take that library and NO OTHER, Arduino have a 'ready to go' library and doesn't count. Btw, Arduinos chips are OLD, useless if you have demanding requirements, I mean, libraries are ok (a bit bugged), just try a serial implementation using 3 UARTS at once at just medium speed with arduino mega, let see how many packages you will loose without notice (happened to me). Once you are familiarized how libraries work you will know what to search on any IDE for any MCU, for any core architecture.

OS integration : at short time to work programming MCU you will realize that the control of schedules over different tasks could become a nightmare and the effort to integrate an OS like FreeRTOS pay the price, so don't wait to suffer and learn it asap. Atmel have a mess in this moment with his IDE and OS integration (personal opinion), Freescale is OK using kinetis design studio (free tool) but the documentation is just shit, so be away from there if you don't want to be frustrated since beginning. I suggest to use some texas instrument MCU for this, they have a bunch of examples, documentation is ok and the have a free IDE (eclipse based) pretty similar with what you could found on real work environment, if not same tool.

Programming tips: this is a matter of experience, but there are some companies that have better practices. Again, for me, texas instrument is a good start point, in their codes you found handy macros and good practices related to variables management, structures and how they use it, etc etc..., in time you will realize that is very important and save you a lot of extra work.

Protocols: Arduino have many 'ready to go' libraries for protocols that you will need to modify in real life, so I suggest to take some sensors and remake basic libraries like i2c and SPI (on any MCU), do it once and that knowledge will be useful forever. UARTS are not so easy as you could think at beginning, buffers are tricky and very related to architecture (registers and stuffs), and could be too complicated.

Asynchonic stuffs : real life is asynchronic (doesn't means multitasking), read and learn how to manage async stuffs, UARTS are a very handy async projects to start. Then jump to some DMA project.

I think I covered the basics.

http://www.ti.com/tool/msp-exp432p401r

Good luck.



----------------------------------------------------------
If works, doesn't means it is right.
 

Offline pmbrunelle

  • Regular Contributor
  • *
  • Posts: 183
  • Country: ca
  • lost mech. guy
Re: Which microcontroller should I learn?
« Reply #28 on: February 08, 2016, 04:53:14 am »
Some people will say you should learn ARM or whatever, but with modern coding practices the core is irrelevant. The biggest hurdles are learning how the peripherals in a specific MCU work (which may vary greatly even within the same family) and how to use the vendor's IDE, frameworks, debugging tools etc.

If you're programming in C, not assembly, then I don't see what the difference is.

I know of one product that has two microcontrollers in it: one is TI, one is Freescale. The programmers on the project were expected to adapt to the differences between the two - and they did.

Learn to program any microcontroller in C, and then the skills will be transferable.
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 3138
  • Country: us
Re: Which microcontroller should I learn?
« Reply #29 on: February 08, 2016, 04:59:36 am »
Learn a BUNCH of different microcontrollers.   Note that "ARM" is NOT a microcontroller; it's just a CPU/Core.  There are too many vendors with significantly different stuff around the ARM bits (which is programmed in C and largely irrelevant anyway.)
You're probably better off learning about applications than chips (the root of the "learn better programming" comment.)  If I want to hire someone to do work on my IoT networking widget, then I want someone who understands networking and/or sensors/etc.  Not necessarily someone who understands the cpu core of the chip I'm using.  Ditto if I'm making a quadcopter; understanding motors and guidance sensors is more important than chips.    You came out of university; you're supposed to be intelligent and flexible enough to LEARN a new chip.
 

Offline eck

  • Contributor
  • Posts: 15
Re: Which microcontroller should I learn?
« Reply #30 on: February 08, 2016, 07:56:27 am »
Among other things, I would like to know which microcontroller is most in demand now and for the foreseeable future.

Maybe a bit outdated, but still interesting:

http://bd.eduweb.hhs.nl/es/2014-embedded-market-study-then-now-whats-next.pdf
 

Offline obiwanjacobi

  • Frequent Contributor
  • **
  • Posts: 971
  • Country: nl
  • What's this yippee-yayoh pin you talk about!?
    • Marctronix Blog
Re: Which microcontroller should I learn?
« Reply #31 on: February 08, 2016, 07:57:26 am »
I also came from Arduino and my next step was using a bare-bones AVR chip in a project and using the Atmel Studio for IDE. That forces you to read the datasheet and step down a level in code. You learn a lot. After that pick an MCU that fits what you're doing (or want to do). I am currently fiddling with the Cypress PSoC-5 (Programmable System on Chip - so CPU -ARM3- and programmable logic) which is good fun.

My main criteria for selecting a direction is the IDE. That is where you spend most of your time.

[2c]
Arduino Template Library | Zalt Z80 Computer
Wrong code should not compile!
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 18870
  • Country: nl
    • NCT Developments
Re: Witch microcontroller should I learn?
« Reply #32 on: February 08, 2016, 09:13:12 am »
learn good programming instead
Well, that's no help...
Actually it is a good suggestion. Invest in some good books on this topic. For example: 'Making embedded systems' by Elecia White is a good book to get started on embedded programming. What makes a good programmer is the ability to divide a complex problem into manageble pieces and layers. C++ data structures is another one I like. I think we'll be seeing more C++ used on microcontrollers so if you know some C++ you'll have some advantage over other applicants.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Which microcontroller should I learn?
« Reply #33 on: February 08, 2016, 10:13:02 am »
You came out of university; you're supposed to be intelligent and flexible enough to LEARN a new chip.

precisely
 

Offline Throy

  • Regular Contributor
  • *
  • Posts: 53
  • Country: de
Re: Which microcontroller should I learn?
« Reply #34 on: February 08, 2016, 11:48:41 am »
I agree with learning to program first.  The rest is just being able to read datasheets IMO.
 

Offline spudboy488

  • Regular Contributor
  • *
  • Posts: 119
Re: Which microcontroller should I learn?
« Reply #35 on: February 08, 2016, 12:50:46 pm »
Here's a thought which was lightly touched. As the OP is basically asking what to learn to become a professional, I would suggest looking at the job advertisements in the field/companies that you would like to work for and see what they are looking for. Sure, it would be great to learn CPU X or IDE Y but if the hiring companies are not looking for people versed in CPU X or IDE Y, you are out of luck. Since you're starting fresh, pick something that has a current market demand to make yourself a better candidate for the position.

 

Offline Bruce Abbott

  • Frequent Contributor
  • **
  • Posts: 616
  • Country: nz
    • Bruce Abbott's R/C Models and Electronics
Re: Which microcontroller should I learn?
« Reply #36 on: February 08, 2016, 05:25:59 pm »
Learn to program any microcontroller in C, and then the skills will be transferable.
So you think he should just stick with the Arduino?
 

Offline MT

  • Super Contributor
  • ***
  • Posts: 1281
  • Country: cn
Re: Which microcontroller should I learn?
« Reply #37 on: February 08, 2016, 05:41:14 pm »
Every time this kind of questions pops up it's answered at least twice with: 8 bitters because they are inside every refrigerators, toasters, and electric BBQ's etc etc etc! Humbug!
« Last Edit: February 09, 2016, 01:49:40 am by MT »
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 10873
  • Country: gb
    • Having fun doing more, with less
Re: Which microcontroller should I learn?
« Reply #38 on: February 08, 2016, 06:20:58 pm »
So, I would like your opinion on which microcontroller should I learn....
I would like to go from a hobbyist to a professional, my goal is to work on product development.
Among other things, I would like to know which microcontroller is most in demand now and for the foreseeable future.

It doesn't matter which one you learn for many reasons, including:
  • your first employer will use a different MCU
  • any specific MCU will be obsolete in three years time, and then you will incorrectly think you are back at the beginning
  • horrifyingly little has changed since the 1980s. It took me longer to choose and install the development tools than it did to get up to speed on modern MCUs.
Back in the 1980s I was programming Z80s+IO boards and ARM devices, cross-compiling C on Xenix, using in-circuit emulators when debugging.
Now I am programming atmega328 and ARM,  cross-compiling C on Linux, using JTAG when debugging.
There is very little difference between the Z80+IO boards and the atmega328.
JTAG gives the same facilities as in-circuit emulators.
Linux = Xenix, at this level.
The only real difference is that in the 1980s I couldn't have afforded the equipment and that it was much larger.

So, concentrate on learning the timeless fundamentals of system design, program and hardware design, and debugging. That will last decades not years.

Then demonstrate that you have set yourself a difficult target, made many mistakes, know how you would do better next time. Employers love that.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline Aodhan145

  • Frequent Contributor
  • **
  • Posts: 401
  • Country: us
Re: Witch microcontroller should I learn?
« Reply #39 on: February 08, 2016, 06:37:57 pm »
If you're interested in ARM, there is an online course from University of Texas that started this January 20:

https://www.eevblog.com/forum/beginners/free-course-ut-6-03x-embedded-systems-on-edx-starting-now/msg846982/#msg846982

Although it already started, I guess you can still enroll. The course is based around the TI implementation of ARM (TM4C123), and you can get the evaluation board directly from TI: https://store.ti.com/Tiva-C-LaunchPad.aspx. I got mine delivered in 4 days, to Sao Paulo.

I didnt like that course. It was way to long/bulky for the little information in it.
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Which microcontroller should I learn?
« Reply #40 on: February 08, 2016, 07:02:17 pm »

nostalgia makes itself called 3 3 2

Back in the 1980s

bought for a sentimental affection for the past,  for a period with happy personal associations
when Unix was not linux, and tools were not open source  :D


 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8229
  • Country: 00
Re: Which microcontroller should I learn?
« Reply #41 on: February 08, 2016, 08:29:02 pm »
I don't think employers are looking for knowledge on particular chips, or even peripherals though farmiliarity with them is helpful.

It is unlikely that as a beginner you will be hired into a senior role without any supervision or training. So your ability to get up the learning curve, coding in a robust way, and good working experience with those chips are far more important than specific knowledge on a particular chip - it is unlikely that your next employer will hire you explicitly to work on that chip.
================================
https://dannyelectronics.wordpress.com/
 

Offline lem_ix

  • Regular Contributor
  • *
  • Posts: 192
  • Country: cs
Re: Which microcontroller should I learn?
« Reply #42 on: February 08, 2016, 09:55:14 pm »
As people have previously mentioned, learn proper programming first. If you have an arduino uno (or w/e) maybe it would be a good idea to program it from Atmel studio in C for a start. You can even do it over usb with some tweaking, no programmer or ftdi required.
When you understand what you're doing on the arduino (atmel atmega328p) switching to any 8-bit mcu won't be difficult. After that go for some ARM and freertos or w/e seems fun.
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 3138
  • Country: us
Re: Which microcontroller should I learn?
« Reply #43 on: February 08, 2016, 11:14:48 pm »
Quote
[68332 eval board] [the 1980s] when Unix was not linux, and tools were not open source
gcc for 68k pre-dates the 68332 by a bit...
Before that, you got a C compiler with your unix system.  Usually based on the Portable C Compiler.  (gcc was better.)
 

Offline pmbrunelle

  • Regular Contributor
  • *
  • Posts: 183
  • Country: ca
  • lost mech. guy
Re: Which microcontroller should I learn?
« Reply #44 on: February 08, 2016, 11:36:50 pm »
Learn to program any microcontroller in C, and then the skills will be transferable.
So you think he should just stick with the Arduino?

OP should stick with Arduino if it's easiest, but use a more standard IDE, and avoid the Arduino libraries.

More importantly though, don't just use a microcontroller to make LEDs blink for no reason.

Use a microcontroller as part of a larger project. Since you say "mechatronic" (does that mean sort of mechanical?), then something has got to move as well. So for example, make a robot dance. Show the range of your skills, don't just focus on one part.

I never learn anything in isolation as a text-book exercise. For example, I never did a standalone op-amp filter. Instead, I decided to build speakers, and then filtering became a necessity. From there, I became motivated to learn about filtering, and I also had realistic design constraints rather than designing something for no reason.
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Which microcontroller should I learn?
« Reply #45 on: February 08, 2016, 11:55:33 pm »
Before that, you got a C compiler with your unix system.  Usually based on the Portable C Compiler.  (gcc was better.)

I got an ANSI C compiler for HPUX/PA1, it was not based on Portable C Compiler
It was made by Avocet Systems, they made a lot of ANSI C Cross-compilers for 8051 family, 68HC11, m68k
and their software was supporting a few commercial Unix such as SunOS, SGI IRIX, HP-UX/PA1, HP-UX/PA2, IBM RS/6000 AIX

in my opinion it's better than GCC (from v2.93 to 3.*) by different orders of magnitude!

SierraC runs on DOS, Motorola included a copy with the BCCDI board
(which means the top gun, debug processor, MC68881, NVRAM and software, ~4000 USD)
in my opinion, after a recent experience: it's the funniest compiler ever tried on dos !
 

Offline Cerebus

  • Super Contributor
  • ***
  • Posts: 4405
  • Country: gb
Re: Which microcontroller should I learn?
« Reply #46 on: February 15, 2016, 02:16:42 am »
Good programmer can write good code even with Arduino

even if arduino is good for rapid prototyping, there are at least three negative aspects
1) arduino's examples, libraries, etc, are (just to use an euphemism) usually not so good
Got to give you that one, the existing library code sucks rocks in places. The APIs are harmless enough though, even if not the most polished.
Quote
2) arduino call the programming "sketch" instead of "code"
Well those of us who've been doing this a while tend to call it a 'program' but we won't arbitrarily discriminate against you for calling it a 'code' as long as you don't discriminate against others because they haven't been around as long. However, what the IDE calls a project/program/whatever isn't exactly a reliable metric for how good an IDE it is.
Quote
3) arduino doesn't have the concept of "module"
You do realise that the Arduino IDE uses the GCC C++ compiler don't you? There is absolutely nothing stopping you writing full C++ classes and the IDE is kind enough to figure out what you're going and just magically compile any other source files you stick into the folder with your .ino file.

In fact I rather like the Arduino IDE. It's simple, efficient and doesn't get in the way. In the time it would take me to get Eclipse or something similar downloaded, configured and working I could download and install the Arduino IDE, write my code and be finished before I'd typed one line of code into Eclipse. But I've only been doing this programming lark since 1975 so I probably don't know what I'm talking about.
Anybody got a syringe I can use to squeeze the magic smoke back into this?
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Which microcontroller should I learn?
« Reply #47 on: February 15, 2016, 08:22:05 am »
Got to give you that one, the existing library code sucks rocks in places. The APIs are harmless enough though, even if not the most polished.

edit: rewritten in more polite form, I would avoid to summarize with too harsh referring to something unpleasant or embarrassing, instead I will use the expression "code definitely downsizing as a euphemism for their cuts", just to underline the possibility they can "improve" :-+

(even if silly blocking-code is still present in their libraries, even the documentation is downsized in quality and still too bugged :palm: :palm: :palm: :palm: )

Well those of us who've been doing this a while tend to call it a 'program' but

the Wiring behind the hood makes the difference between "sketch" and "program"
which is bad for code analyzers.

You do realise that the Arduino IDE uses the GCC C++ compiler don't you?

knowledge and insight, the toolchain has absolutely no relation with the importance of being able to code with modularity in mind.
Once again arduino guys have proved to have absolutely no idea about that.
« Last Edit: February 15, 2016, 11:26:42 am by legacy »
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Which microcontroller should I learn?
« Reply #48 on: February 15, 2016, 08:37:20 am »
"mechatronic" (does that mean sort of mechanical?)

it's a mashup between electronics and mechanics, imagine a course where you study mechanics integrated with electronic, it's more mechanics than electronics, you can say electronics applied to mechanics

in my opinion, I believe your advice - don't learn by exercises which focus on reduced knowledge and didactical insight, learn by the whole projects as multidisciplinary synergy - is the best one  :-+ :-+ :-+ :-+
 

Offline Roicker

  • Contributor
  • Posts: 11
  • Country: mx
Re: Which microcontroller should I learn?
« Reply #49 on: February 16, 2016, 09:31:41 pm »
First things first... TL; DR; If you want to learn embedded seriously, buy something that is not an Arduino. My recommendation? The TIVA C for $12 + shipping

I think I may be qualified to answer the OP's original question. I have a B.S. in Mechatronics, M. Sc. in Control and I work as the SW Group Leader of a big Tier 1 (we sell to most of the automotive OEMs of the world) that makes ADAS Sensors. I'm not bragging, I just bring this up to try to explain why I think I'm qualified to give a relevant opinion.

I've hired a lot of people over the last years for the position of Embedded SW developer for Instrumentation Displays (Clusters) and ADAS Sensors and one thing that I really don't like to see in a candidate is when they say they know embedded because they have programmed in Arduino. Let me explain this: I don't think arduino is bad, it's actually a great tool (I have one in my 3D printer) for when you want something cheap and that can be reproduced by many, but if you only have used it with the libraries that come with it, or you bought a shield and downloaded code from somewhere... well I don't think I would be very interested in hiring you in that case. The problem in an interview is to separate the people that actually learned with an arduino from the people that only downloaded code and connected some cables.                   

If you have used Arduino for doing something complex (like program Ardupilot or Repetier for a 3D printer :P) well then it's easy for me (and any interviewer) to see that you have potential because you took a simple tool and built something great with it.

For the reasons mentioned above I think using something like a PIC, an ST or TI ARM or even an AVR Mega (I know that is the MCU of the Arduino, but I mean directly without the code base) is better for actually learning Embedded Systems. The current toolchains have the basic startup for the MCUs but after that, you need to analyze examples and read datasheets to understand how to setup and use the peripherals and debug SW by checking how the system is behaving after each step. These things are what we are looking for in embedded SW devs, engineers that can analyze requirements and write code to realize them and if something goes wrong DEBUG IT! With an Arduino most of this has been done, all you have to do is call a function. Also, the toolchain doesn't allow you to do in circuit debugging as far as I know you can only "code and pray" that it works.

The main problem with Arduino for me is: It makes it too easy! that is great if you don't want a career in Embedded SW, but if you do, I recommend something else.

My personal recommendation (because I've bought a couple of kits and worked with several MCUs) is the Tiva C from Texas instruments. Why?

1. The thing is cheap ($12) dlls plus shipping, but if you bundle that with other components you may need it's ok
2. Has good support from a community (it's obviously not as good as arduino but it works)
3. You have an In-Circuit Debugger included for free, which means you can execute your code step by step, set breakpoints, see the memory, etc. and all of this is great for learning and debugging
3. It has code examples and tutorials to teach you the basics because it's aimed at the DIY community
4. As long as you are using that board the compiler and toolchain are free with unlimited code size
5. It has a fast ARM Cortex M4F (with floating point) and it has a lot of peripherals

hope this helps!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf