Which MCU family has the lowest entry barrier?

Thread Starter

WBahn

Joined Mar 31, 2012
32,702
I've been out of the MCU game for quite some time and am thinking about getting back into it from an educational perspective. I'm considering developing small projects and, perhaps, putting kits together to sell to students (as part of a class or as individual projects). To support this, I'd like to be able to take them from step zero (i.e., someone that has never done anything with a microcontroller before) by developing tutorials that get them up and going covering all the basics -- where to get parts, how to wire up a micro, how to use the needed software, how to program it. Essentially, a truly step-by-step Hello World intro.

I'm NOT interested in using platforms like Arduino or anything that is based around prebuilt modules that have an MCU at their heart. I want students to use bare metal parts and design around them. I'm primarily targeting EE students.

So, with that background, I'm looking for a good choice of platform to use. Factors under consideration include cost of parts, yes, but also the cost of software and the hardware needed to program and otherwise interact with the parts. I'm also looking for platforms that, at their basic level, have a low learning curve to get up and going. Having a bunch of bells and whistles can be great down the road, but sometimes they get in the way of someone that just wants to make an LED blink. Think of it this way -- we often have threads where someone is trying to do something in hardware that would be trivial to do with an MCU, but they are reluctant to go down that road because they are intimidated by the complexity, learning curve, and/or cost to get started. What I'm trying to do is to find a solution that offers the lowest overall barrier to entry for that person and to then guide them through that process.

With regard to language, I'm split between C and Assembly. My preference would probably be to start them off with assembly, but it would be nice to have a C compiler as an option, perhaps later.

So, with all that in mind, I'm very interested to hear people's perspectives on difference MCU families and their development tools with respect to their pros and cons along these lines.

Thanks in advance!
 

MaxHeadRoom

Joined Jul 18, 2013
30,557

Papabravo

Joined Feb 24, 2006
22,058
The PIC series has had remarkable staying power over at least 3 decades (1994-present) while many other parts have literally become orphans. They are amenable to projects in both assembly language and higher-level languages. Since Microchip acquired Atmel a few years ago I have not kept up with the progress of the ATtiny and ATmega families. If Microchip is still developing and promoting them, I think they would make viable alternatives.
 

Ian0

Joined Aug 7, 2020
13,097
I would recommend starting with the small ARM processors such as NXPs LPC812. The ARM assembly language is beautifully simple and easy to learn, it's actually not much different to the ATMEL parts. Being 32-bit makes it much easier to write in assembler as you don't run out of numbers at ±127, you can go beyond 2,000,000,000 without having to learn how to carry and borrow.
There are also plenty of C compilers.
The downside is that the peripherals tend to be rather complicated.
 

Thread Starter

WBahn

Joined Mar 31, 2012
32,702
The 8-pin MCUs are definitely on the table. Many of the projects that could effectively use an MCU instead of a slew of digital chips can be done with an eight pinner. Once they get through that initial barrier, moving up to more I/O or whatever shouldn't be so intimidating. When I went out to Microchip's site (which doesn't seem very friendly for my purposes), it looked like the lowest cost programmer they had was well over a thousand dollars. But after doing some more searching I found something just under a hundred, which would still scare away a lot of folks. With even more hunting I finally ran across their Snap product at $15. That's the kind of price that most people shouldn't balk at. If it will let them program a DIP part on a solderless breadboard (and it looks like it probably will), then that's worthy of further exploration.
 

Thread Starter

WBahn

Joined Mar 31, 2012
32,702
I would recommend starting with the small ARM processors such as NXPs LPC812. The ARM assembly language is beautifully simple and easy to learn, it's actually not much different to the ATMEL parts. Being 32-bit makes it much easier to write in assembler as you don't run out of numbers at ±127, you can go beyond 2,000,000,000 without having to learn how to carry and borrow.
There are also plenty of C compilers.
The downside is that the peripherals tend to be rather complicated.
The 8-bit vs 32-bit tradeoffs are something I am struggling with. On the one hand, there are certainly lots of problems that are much easier to solve with a 32-bit data word compared to 8-bit. On the other hand, for what I have in mind (or, at least, one thing I have in mind) is to use the limited capabilities of an 8-bit platform to have them learn the fundamentals needed to implement wider-bit algorithms, as well as how to do things like multiplication and division on processors that don't have such instructions (and I'm assuming the low-end PICs still don't).
 

nsaspook

Joined Aug 27, 2009
16,249
The PIC18 family is a good entry level 'bare metal' controller if C is going to be the main language with ASM being an 'example' language for learning and comparison. Even some of latest families are still available in DIP packages that make starting from zero bread-boarding easier. The added advantage of older technology 5V devices is how rugged they are.

I'm using the newer Q84 8-bit series for a several projects using my same basic board reference design.
https://www.microchip.com/en-us/pro...microprocessors/8-bit-mcus/pic-mcus/pic18-q84

1737488573847.png
1737488650493.png

1737488731307.png
https://github.com/nsaspook/Q84vtouch/blob/q84/mateQ84.X/mate_a_sch.pdf
https://github.com/nsaspook/Q84vtouch/blob/q84/mateQ84.X/mate_a_brd.pdf

C Software example for the FM80 boards using the mplabX IDE with the xc8 compiler. https://github.com/nsaspook/Q84vtouch/blob/q84/mateQ84.X/main.c

The interface controller is part of the Solar Energy project.
https://forum.allaboutcircuits.com/threads/fm80-solar-charge-controller-datalogger.194146/
 

nsaspook

Joined Aug 27, 2009
16,249
The 8-bit vs 32-bit tradeoffs are something I am struggling with. On the one hand, there are certainly lots of problems that are much easier to solve with a 32-bit data word compared to 8-bit. On the other hand, for what I have in mind (or, at least, one thing I have in mind) is to use the limited capabilities of an 8-bit platform to have them learn the fundamentals needed to implement wider-bit algorithms, as well as how to do things like multiplication and division on processors that don't have such instructions (and I'm assuming the low-end PICs still don't).
I wouldn't recommend starting with 32-bit controllers if you plan on 'bare metal' training with people with little embedded hardware and programming experience. The setup baggage for just a simple blink LED on 32-bits can be intimidating with just register banging and even simple things like a UART, that can have capabilities designed for OS style systems, might requite pages of register level reading from datasheets for simple polling I/O.

I normally use 32-bit systems when I need capabilities that are impossible of 8-bit controllers, not instead of 8-bit controllers.
 
Last edited:

Ian0

Joined Aug 7, 2020
13,097
I learned assembler a long time ago (on a 6502) and it was very refreshing with the ARM to be able to do lots of interesting and useful stuff before running out of numbers. With an 8-bit you can't get very far before you have to deal with the extra complexity of multi-precision arithmetic. Inevitably, though, with the ARM, you will eventually write a routine which produces an intermediate product >2^31 and you have to learn to deal with it.
In other words, it just re-arranges the chapters in the book. In both cases you have to learn how to do multi-precision maths at some point, but you get to do much more useful and interesting stuff with 32-bit, before you have to learn it.
 

Ian0

Joined Aug 7, 2020
13,097
I wouldn't recommend starting with 32-bit controllers if you plan on 'bare metal' training with people with little embedded hardware and programming experience. The setup baggage for just a simple blink LED on 32-bits can be intimidating with just register banging and even simple things like a UART, that can have capabilities designed for OS style systems, might requite pages of register level reading from datasheets for simple pooling I/O.
From experience, it's very much a mixed bag.
The only difference between 8-bit and NXP and Renesas's 32-bit GPIO is that the ARMs have one bit that needs enabling to make it work. Then it's just reading and writing one bit per pin.
CAN peripherals on both 8-bit and 32-bit are both complex.
NXP's UART is lifted straight out of a 16550 and is simple to set up. Renesas's is a minefield.
 

nsaspook

Joined Aug 27, 2009
16,249
I learned assembler a long time ago (on a 6502) and it was very refreshing with the ARM to be able to do lots of interesting and useful stuff before running out of numbers. With an 8-bit you can't get very far before you have to deal with the extra complexity of multi-precision arithmetic. Inevitably, though, with the ARM, you will eventually write a routine which produces an intermediate product >2^31 and you have to learn to deal with it.
In other words, it just re-arranges the chapters in the book. In both cases you have to learn how to do multi-precision maths at some point, but you get to do much more useful and interesting stuff with 32-bit, before you have to learn it.
I just find a 32-bit controller with hardware double precision FP (with atomic math operations) in today's market. Many of the GP 32-bit processors don't really have good hardware FP but there are 32-bit controllers specifically designed for things like motor control/DSP that do.
 

joeyd999

Joined Jun 6, 2011
6,204
I've been out of the MCU game for quite some time and am thinking about getting back into it from an educational perspective. I'm considering developing small projects and, perhaps, putting kits together to sell to students (as part of a class or as individual projects). To support this, I'd like to be able to take them from step zero (i.e., someone that has never done anything with a microcontroller before) by developing tutorials that get them up and going covering all the basics -- where to get parts, how to wire up a micro, how to use the needed software, how to program it. Essentially, a truly step-by-step Hello World intro.

I'm NOT interested in using platforms like Arduino or anything that is based around prebuilt modules that have an MCU at their heart. I want students to use bare metal parts and design around them. I'm primarily targeting EE students.

So, with that background, I'm looking for a good choice of platform to use. Factors under consideration include cost of parts, yes, but also the cost of software and the hardware needed to program and otherwise interact with the parts. I'm also looking for platforms that, at their basic level, have a low learning curve to get up and going. Having a bunch of bells and whistles can be great down the road, but sometimes they get in the way of someone that just wants to make an LED blink. Think of it this way -- we often have threads where someone is trying to do something in hardware that would be trivial to do with an MCU, but they are reluctant to go down that road because they are intimidated by the complexity, learning curve, and/or cost to get started. What I'm trying to do is to find a solution that offers the lowest overall barrier to entry for that person and to then guide them through that process.

With regard to language, I'm split between C and Assembly. My preference would probably be to start them off with assembly, but it would be nice to have a C compiler as an option, perhaps later.

So, with all that in mind, I'm very interested to hear people's perspectives on difference MCU families and their development tools with respect to their pros and cons along these lines.

Thanks in advance!
I agree PIC is probably the easiest to get started with, and PIC18F is "better" for youngsters in that they don't have to deal with the very unusual RAM paging of the lesser families.

I wish I was your neighbor: I'd offer my services as a lab assistant at no charge.
 

MaxHeadRoom

Joined Jul 18, 2013
30,557
The 8-pin MCUs are definitely on the table. Many of the projects that could effectively use an MCU instead of a slew of digital chips can be done with an eight pin
. If it will let them program a DIP part on a solderless breadboard (and it looks like it probably will), then that's worthy of further exploration.
If you use the free programming S/W and start of with the Pickit3 programmer and MPLAB IDE ver8.92, it is very simple a cheap to start with, if you want the Aliexpress version of Pickit3, you can get it for a couple of $$'s
https://ww1.microchip.com/downloads/aemDocuments/documents/OTH/ProductDocuments/MISC/50002010B.pdf
 
Last edited:

GetDeviceInfo

Joined Jun 7, 2009
2,270
Im not sure I get if it's hardware, IDE, toolchain.. , and why not Arduino? it will expose you to a much larger community, and what I think your describing could still applied to the most popular tool.
 

nsaspook

Joined Aug 27, 2009
16,249
Im not sure I get if it's hardware, IDE, toolchain.. , and why not Arduino? it will expose you to a much larger community, and what I think your describing could still applied to the most popular tool.
Per @WBahn "I want students to use bare metal parts and design around them. I'm primarily targeting EE students"

I've often used Arduino hardware compatible platforms but never their programming abstraction as I see it as clumsy and inefficient for the sort of work I do, as it defaults to the common denominator of the Arduino community (IMO, with the primary objective of getting X do something tangible and quickly instead of understanding all that's needed to make X work at the bare-bones level) instead of professional (or training to be) embedded engineers that have somewhat different objectives (having or learning the skills for bare bones design, control, management, etc ... from the wire up) than that community when designing things and making them work.

It's not good or bad, better or worse, just different.
 
Last edited:

trebla

Joined Jun 29, 2019
599
Lowest software entry barrier for assembler development IMO has the Microchip PIC baseline MCU (PIC16F54 for example) but cheapest development tools you can get from STM around $10 (Nucleo 64 STM32 board as devboard and also as a programmer). IDE-s for both MCUs are free.
 

atferrari

Joined Jan 6, 2004
5,001
I've been out of the MCU game for quite some time and am thinking about getting back into it from an educational perspective. I'm considering developing small projects and, perhaps, putting kits together to sell to students (as part of a class or as individual projects). To support this, I'd like to be able to take them from step zero (i.e., someone that has never done anything with a microcontroller before) by developing tutorials that get them up and going covering all the basics -- where to get parts, how to wire up a micro, how to use the needed software, how to program it. Essentially, a truly step-by-step Hello World intro.

I'm NOT interested in using platforms like Arduino or anything that is based around prebuilt modules that have an MCU at their heart. I want students to use bare metal parts and design around them. I'm primarily targeting EE students.

So, with that background, I'm looking for a good choice of platform to use. Factors under consideration include cost of parts, yes, but also the cost of software and the hardware needed to program and otherwise interact with the parts. I'm also looking for platforms that, at their basic level, have a low learning curve to get up and going. Having a bunch of bells and whistles can be great down the road, but sometimes they get in the way of someone that just wants to make an LED blink. Think of it this way -- we often have threads where someone is trying to do something in hardware that would be trivial to do with an MCU, but they are reluctant to go down that road because they are intimidated by the complexity, learning curve, and/or cost to get started. What I'm trying to do is to find a solution that offers the lowest overall barrier to entry for that person and to then guide them through that process.

With regard to language, I'm split between C and Assembly. My preference would probably be to start them off with assembly, but it would be nice to have a C compiler as an option, perhaps later.

So, with all that in mind, I'm very interested to hear people's perspectives on difference MCU families and their development tools with respect to their pros and cons along these lines.

Thanks in advance!
The PIC 18F family is mine suggestion. I work in Assembly and jumped to the most recent version, MPLABX, long ago.
 
Top