Which MPU is the most popular and will be around for long time?

In summary: Hi,Just wondering if there are any general recommendations on what to learn when programming an AVR. I've been looking at the different ones on the market and some of them seem a bit too complicated for my level of experience.In Summary,Advice on what to learn when programming an AVR is to focus on the things that will make the task easier, such as learning a C language. It is also important to be flexible and to try different tools on the way to finding what is best for you.
  • #1
yungman
5,755
293
Hi

Just want to know which of the MPU I should learn that will be around and popular for a long time. I bought the Elegoo with ATmega328P. Before I invest time learning how to program it, I want to make sure I choose the right one.

Thanks
 
Computer science news on Phys.org
  • #2
Program what you can get now, that will do the job today. A better solution becomes available every three years. The more you program, the less you notice the difference between the systems.
 
  • Like
Likes DaveE and russ_watters
  • #3
What really matters is not the expected 'survival' of the exact MPU ( ATmega328P is actually at the end of its lifespan - what may mean tons of useful software and cheap hardware => might be exactly a good one for beginners!), but the quality of support (both from manufacturer and community).

Likely all the programming will be done in some C language and you will not meet directly the underlying HW at all => focus on the things what makes your tasks (learning) easier.

Also, try different ones on the way. Flexibility is also an important aspect.
 
  • Like
Likes yungman, DaveE and Wrichik Basu
  • #4
Rive said:
What really matters is not the expected 'survival' of the exact MPU ( ATmega328P is actually at the end of its lifespan - what may mean tons of useful software and cheap hardware => might be exactly a good one for beginners!), but the quality of support (both from manufacturer and community).

Likely all the programming will be done in some C language and you will not meet directly the underlying HW at all => focus on the things what makes your tasks (learning) easier.

Also, try different ones on the way. Flexibility is also an important aspect.
Thanks, That's not good to hear ATmega328P is at the end of life. I want to learn something that is going to be around. I did some search, seems like 8051 is still popular, also PIC(which I don't know anything).

I have not design MPU circuits for a long time and I never really do any programming on it as I just design the hardware and let the Jr engineer do the programming. I am really learning it like the first time. I want to learn something that last.

I know I can program in C, but the little that I learn, I still need to know the registers and all the particulars of the MPU to program it, it's still hundreds of pages of reading the datasheet.

Correct me if I am wrong, I designed with MPU like 20yrs ago using 8051 based and 6800, their pins are much simpler, not multiple purpose pins that can be ADC inputs, digital in/out, interrupts and all options. Are all new MPUs like this or just the AVRs are this complicated?

In another words, is ATmega328P type too complicate for it's worth? That's it's better to go with something simpler and will be around for a long time?

Thanks
 
  • #5
yungman said:
not good to hear ATmega328P is at the end of life.
It's just 'not recommended for new design'. It'll still linger around for a decade or so, and if you take it's relatives into account, then 'forever'... I did not check its background so I can't say anything about recommending it or not, but don't be discouraged by lifecycle: just look for support and resources.

yungman said:
I am really learning it like the first time. I want to learn something that last.
Then learn to use the provided environment and focus on C instead the actual chip.

Just start with it. You will be surprised. (And, maybe a bit disappointed too. 8051 and 6800, you say? Programming is far less romantic these days).

yungman said:
Are all new MPUs like this or just the AVRs are this complicated?
Yes, most of them. In return, it's quite convenient.

Once upon a time we made a new device. We picked the newest chip on the market and ordered some pre-release samples so we could have a head start - or at least we thought so.
We had to wait for the programming environment, we needed to debug the chip because it had bugs and finally we needed to order the samples again, because accidentally we got pieces from a batch made for a special customer (with slightly different internals). Instead a head start what we got was months of delay and lot of headache at the end.

It's no sin to go with an established chip.
 
Last edited:
  • Like
Likes Vanadium 50 and yungman
  • #6
Hi Rive, do you mean ATmega328 might be out dated, but they very likely come out with newer ones that just an improvement over ATmega328 and most of the knowledge and even programs will work?

If that is the case, then yes, that would be nice. Learning the name of the registers is the hardest part!!

Thanks
 
  • #7
yungman said:
do you mean ... most of the knowledge and even programs will work?
Programs not (not without tweaking), but knowledge - absolutely. It's difficult to explain without actual experience.
Just pick a cheap, popular devkit with good support and enironment (forget about lifecycle) and give it a go.
 
  • Like
Likes pbuk and yungman
  • #8
Rive said:
Programs not (not without tweaking), but knowledge - absolutely. It's difficult to explain without actual experience.
Just pick a cheap, popular devkit with good support and enironment (forget about lifecycle) and give it a go.
What is the next generation follow the ATmega328? I want to find the datasheet and compare how much knowledge of the 328 is useful. Like do they name the registers the same and memory location, and ports.

Thanks
 
  • #9
Rive said:
Just pick a cheap, popular devkit with good support and enironment (forget about lifecycle) and give it a go.
This.

Just start programming your Elegoo Arduino clone using the Arduino IDE and tutorials, you will soon see that registers and datasheets are completely irrelevant to you: the hardware is abstracted away from you by libraries built by others.
 
  • Like
Likes yungman and Rive
  • #10
pbuk said:
This.

Just start programming your Elegoo Arduino clone using the Arduino IDE and tutorials, you will soon see that registers and datasheets are completely irrelevant to you: the hardware is abstracted away from you by libraries built by others.
I am new on this, I read some examples of program, they still use name of the registers to program it. In another words, one need to know what to write to the registers to set up ports to be simple in/out digital ports, ADC, interrupt, clk etal. Seems like I do have to know all those.

But again, I never wrote C++ for MPU.

Thanks
 
  • #13
pbuk said:
Ignore everything in that thread
Right. All that's about reinventing the wheel: preparing to do all the miscellaneous stuff what's been done, re-done and re-re-done countless times already.

In any modern programming environment all the low level things are readily available. After some 'shopping' (selecting what you need), you get a complete library (with available source, of course: free for tweaking - but honestly, exactly that kind of tweaking is what takes most of the debug time...) error free, clean and nice.

But really, instead of all that talk just give it a go. You'll see.
 
  • Like
Likes pbuk and yungman
  • #14
pbuk said:
OMG, this is you isn't it: https://www.edaboard.com/threads/question-on-learning-atmega328-using-elegoo-kit.407286/

Ignore everything in that thread: this is explaining how to program the thing in assembler. Nobody in their right mind would do that, just follow the tutorial on the Arduino site https://www.arduino.cc/en/Guide.
No no, I insisted on doing assembly, they advice me not to.

I did assembly programming in late 70s and early 80s with Z80 and 8085. I also feel I need to learn what's inside the MPU like registers, WDT, Interrupt, ADC, ports. That's why I want to get familiar with the MPU before I move onto C.

Also, I found from reading sample programs in the data sheet, even if you write in C, you still need to know and program those registers to control the MPU. So that is my learning phase.

I don't have a schedule, I just learn it for fun, so I can take my time learning some assembly.
 
  • #15
Rive said:
Right. All that's about reinventing the wheel: preparing to do all the miscellaneous stuff what's been done, re-done and re-re-done countless times already.

In any modern programming environment all the low level things are readily available. After some 'shopping' (selecting what you need), you get a complete library (with available source, of course: free for tweaking - but honestly, exactly that kind of tweaking is what takes most of the debug time...) error free, clean and nice.

But really, instead of all that talk just give it a go. You'll see.
So for example, if I want to set up to use ports as digital ports, I can just get the power up reset start up module from somewhere and just use it?

Might sound stupid, I don't know they have those like in C++ that I can get all the graphics and all that.

Thanks
 
  • #16
yungman said:
So for example, if I want to set up to use ports as digital ports, I can just get the power up reset start up module from somewhere and just use it?
Yeah, something like that.

All the thing is about getting the right libraries and learn how to use them properly.
Very (!!!) rare that you need to do some register-level stuff.
 
  • Like
Likes yungman
  • #17
Rive said:
Yeah, something like that.

All the thing is about getting the right libraries and learn how to use them properly.
Very (!!!) rare that you need to do some register-level stuff.

WOW, I am OLD!!!

I did assembly programming and I liked it those days.

There got to be some advantage learning the assembly of the MPU, isn't it? To get a better feel of the circuit?
 
  • #18
yungman said:
There got to be some advantage learning the assembly of the MPU, isn't it? To get a better feel of the circuit?
Honestly, I don't think it has any advantage for a hobby user. It won't be faster, won't be smaller, but it'll generate far more troubles, especially when/if mixed with C ...
Also, it's very (!) easy to get to a point when you have several different pieces of hardware and while the libraries will be more or less similar, on assembly/register level they will be worlds apart.

The only part where HW level comes into play is when you are interfacing your board with some new, custom built hardware (and you need to match the circuitry).

But (as far as I know) even the libraries were written in C. Plenty of material to tweak with.

If you like to mess with assembly, then maybe you could pick up some small PICMicro controllers. There, size still matters :wink:
 
  • Like
Likes Dale and yungman
  • #19
yungman said:
No no, I insisted on doing assembly, they advice me not to.
What is the point of asking questions If you never listen to the answers?

yungman said:
I did assembly programming in late 70s and early 80s with Z80 and 8085.
So did I, you had to because there was no publicly available ecosystem, but it was fun. But now it's 2023 and any hardware environment comes with a publicly available ecosystem with thousands of man-years of work behind it so if you want to get anything done you need to use it, the same way as if you want a steak for dinner you don't go out and hunt a buffalo.

yungman said:
I also feel I need to learn what's inside the MPU like registers, WDT, Interrupt, ADC, ports.
But you don't.

Look, here is the whole of the initialization block for an audio spectrum analyser project (the whole thing is only 116 SLOC):
C++:
#include <arduinoFFT.h>
#include <MD_MAX72xx.h>
#include  <SPI.h>

#define SAMPLES 64            //Must be a power of 2
#define HARDWARE_TYPE  MD_MAX72XX::FC16_HW   // Set display type  so that  MD_MAX72xx library treets it  properly
#define MAX_DEVICES  4   // Total number display modules
#define  CLK_PIN   13  // Clock pin to communicate with display
#define DATA_PIN  11  //  Data pin to communicate with display
#define CS_PIN    10  // Control pin to  communicate with display
#define  xres 32      // Total number of  columns in  the display, must be <= SAMPLES/2
#define  yres 8       // Total number of  rows  in the display

MD_MAX72XX  mx = MD_MAX72XX(HARDWARE_TYPE, CS_PIN, MAX_DEVICES);   // display object
arduinoFFT  FFT = arduinoFFT();                                    // FFT object

void  setup() {  
    ADCSRA = 0b11100101;      // set ADC to free running mode  and set pre-scalar to 32 (0xe5)
    ADMUX = 0b00000000;       // use pin A0 and  external voltage reference
    pinMode(buttonPin, INPUT);
    mx.begin();           // initialize display
    delay(50);            // wait to get reference  voltage stabilized
}
That's as close as the software gets to the hardware, all the work (including the FFT) is done by libraries.

yungman said:
Also, I found from reading sample programs in the data sheet, even if you write in C, you still need to know and program those registers to control the MPU. So that is my learning phase.
If you read the maintenance manual for a jet engine you will find that you need to know a lot of stuff to design a fuel control system, but you don't need to know any of that before you book an overseas holiday.

yungman said:
I don't have a schedule, I just learn it for fun, so I can take my time learning some assembly.
If you want to have fun learning some assembly play TIS-100, but I thought you wanted to learn how to do stuff with a microcontroller?
 
  • Like
Likes yungman
  • #20
pbuk said:
What is the point of asking questions If you never listen to the answers?
Actually I was asking about what MPU should I learn, not asking whether I should learn assembly. I decided to get into it a little more regardless. People in EDA advice me not to also. I want to know a little more on what's new in the modern MPU. I don't have a time line, this is just recreational for me. I do want to find a MPU that will last a while.

thanks
 
  • #21
pbuk said:
Look, here is the whole of the initialization block for an audio spectrum analyser project (the whole thing is only 116 SLOC):
Here is your example program.

#include <arduinoFFT.h>
#include <MD_MAX72xx.h>
#include <SPI.h>
#define SAMPLES 64 //Must be a power of 2
#define HARDWARE_TYPE MD_MAX72XX::FC16_HW // Set display type so that MD_MAX72xx library treets it properly
#defineQ MAX_DEVICES 4 // Total number display modules
#define CLK_PIN 13 // Clock pin to communicate with display
Don't you need to know how many CLK PIN available and can be used?

#define DATA_PIN 11 // Data pin to communicate with display
Don't you need to know how many DATA PIN available and can be used?

#define CS_PIN 10 // Control pin to communicate with display
Don't you need to know how many CS_PIN available and can be used?

#define xres 32 // Total number of columns in the display, must be <= SAMPLES/2
#define yres 8 // Total number of rows in the display
MD_MAX72XX mx = MD_MAX72XX(HARDWARE_TYPE, CS_PIN, MAX_DEVICES); // display object
arduinoFFT FFT = arduinoFFT(); // FFT object

void setup() {
ADCSRA = 0b11100101; // set ADC to free running mode and set pre-scalar to 32 (0xe5)
Don't you need to know what register ADCSRA is?
ADMUX = 0b00000000; // use pin A0 and external voltage ref
Don't you need to know what register ADMUX is?
pinMode(buttonPin, INPUT);
mx.begin(); // initialize display
delay(50); // wait to get reference voltage stabilized
}

Even with this short program, seems to me you need to know the MPU more to program like what I wrote in BLUE? meaning reading the datasheet and look at all the control registers, port pins available, dedicated inputs and outputs. Am I really doing unnecessary work looking into details?

Thanks
 
  • #22
yungman said:
Here is your example program.
It's not mine, I just found it out there.

yungman said:
Don't you need to know how many CLK PIN available and can be used?
Don't you need to know how many DATA PIN available and can be used?
Don't you need to know how many CS_PIN available and can be used?
Don't you need to know what register ADMUX is?

Am I really doing unnecessary work looking into details?
Yes, you won't find anything you need in the documentation for the microcontroller, it is all in the documentation for the development board you have bought that uses the microcontroller.
 
  • #23
pbuk said:
It's not mine, I just found it out there.Yes, you won't find anything you need in the documentation for the microcontroller, it is all in the documentation for the development board you have bought that uses the microcontroller.

Maybe I should clarify, I want to program the MPU with in mind that I actually DESIGN the circuit using the MPU and then program it. I got the Elegoo kit just as starter, I have every intention designing my our circuit, my own pcb using the ATmega328 to do something in the future. So I need to know what I am dealing with. I designed circuits with MPUs before like 68HC11 and an Analog Device with 8051 core. But I just design the hardware part, I had my jr engineer wrote the program. Now that I retired and have time, I want to do the programming. Hardware is piece of cake to design for me,

The datasheet of the ATmega328 gives detail of each of those registers and how to set the registers. That seems to be the key of programming the MPU.

Even if you find sub modules other people wrote, still it seem it's important to know what the MPU has to program it. I just don't quite get I don't need to know the detail of MPU to program it.

Come to think about it, There's no DAC in ATmega328, I might want to look into one with DAC.

Thanks
 
  • #24
yungman said:
I want to know a little more on what's new in the modern MPU.
Besides 8Bit microcontrollers like the one you have bought, there are also 32Bit microcontrollers. The dominant platform for the processor core here is ARM, and STM32 microcontrollers are widely used. (There's also a great variety of development boards for them. See this video for an intro.)

This is what's really used in the automation industry for example. Correspondingly, the learning curve is much steeper than with the Arduino. Arduino projects are within the reach of high school students with no prior programming experience. For a platform like the ARM Cortex-M series, there are still (vendor-specific) libraries but you typically need a much better understanding of the MCU and of the peripherals compared to the Arduino, as well as a better understanding of the C programming language (Assembly language is pretty irrelevant regardless of platform).

The nice thing about ARM-based microcontrollers is that there are different variants with widely different capabilities. They can be programmed bare metal, by using a minimal real-time operating system like FreeRTOS, by using an optimized embedded Linux like Yocto, or even by using a desktop Linux like Raspbian on the Raspberry Pi. They also dominate the market of mobile phones.
 
  • Like
Likes berkeman
  • #25
yungman said:
The datasheet of the ATmega328 gives detail of each of those registers and how to set the registers. That seems to be the key of programming the MPU.
Not these days. At the top of the food chain there are chips with 50+ functions integrated into a few hundred pin package, with each pin having 2-3-4 possible function, depending on the setting of configuration bits.
Regarding the available/possible memory and computing power of the 486-P1 era can be considered 'entry level', and as we know even that time it was far beyond the capabilities of a single programmer to do all the job for anything serious.

No way around libraries and IDEs any more and consequently: no real need for register level knowledge. Functional blocks are handled like black boxes, with the capabilities and the library on one side, and the actual pins at the other.

Even medium size companies rather buying (or copying the entire schematics, if no way around) a proven module/devkit than making their own and that Elegoo/ATmega328P thing prepares you exactly for this world. You can/should think of the board the way you thought about your 68HC11 chip way back (even the size is not that far off, actually...) and use it just like that: as a complete functional block, which you can wrap additional circuitry around to match your needs.

Of course you can chose/chase a different way, but it would be more of a fruitless lone struggle than fun.
 
Last edited:
  • Like
Likes berkeman, kith and pbuk

FAQ: Which MPU is the most popular and will be around for long time?

Which MPU is currently the most popular among consumers?

The most popular MPU currently among consumers is the AMD Ryzen series. It offers high performance at a competitive price point, making it a popular choice for both gamers and professionals.

Will Intel's Core series continue to be around for a long time?

Intel's Core series has been a staple in the MPU market for many years and is expected to continue to be around for a long time. Intel has a strong track record of innovation and is constantly releasing new iterations of their Core series to meet the demands of consumers.

What about ARM-based MPUs? Are they gaining popularity?

ARM-based MPUs are indeed gaining popularity, especially in the mobile and IoT markets. Companies like Apple and Qualcomm have been utilizing ARM architecture in their MPUs for years, and the trend is expected to continue as ARM-based MPUs offer energy efficiency and performance benefits.

Is there a specific MPU brand that is known for longevity and reliability?

Intel is a brand that is known for longevity and reliability in the MPU market. Their processors have a reputation for being durable and long-lasting, making them a popular choice for consumers looking for a reliable MPU.

How can I determine which MPU will be around for a long time?

One way to determine which MPU will be around for a long time is to look at the track record of the manufacturer. Companies like Intel, AMD, and ARM have been in the MPU market for many years and have a history of releasing new products regularly. Additionally, reading reviews and staying up to date on industry news can help you make an informed decision on which MPU is likely to stick around for the long haul.

Similar threads

Replies
5
Views
2K
Replies
7
Views
1K
Replies
7
Views
497
Replies
10
Views
2K
Replies
22
Views
1K
Replies
4
Views
5K
Replies
1
Views
1K
Replies
3
Views
1K
Back
Top