Which architecture(s) for the future? - Page 1
Forum section: electronics / general

author: GlowingGhoul
author_rank: Regular Contributor
timestamp: November 05, 2018, 03:40:18 pm
content: OK, on one level, I find overly broad, RTFM type questions to be irritating. However, after reviewing dozens of articles that give an overview of the state of microcontrollers, I'm left nearly as confused as I was before I began.While the "best" microcontroller is defined by the application, where should a blank-sheet tinkerer begin? I would hate to invest the time in one architecture, only to find it's a dead end in a few short years and have to switch to another.The 8051 family seems broad and deep, but is this platform going to continue to be the recipient of continued development, or is it a matter of market momentum for a long established architecture keeping it artificially propped up?

author: sokoloff
author_rank: Super Contributor
timestamp: November 05, 2018, 03:46:00 pm
content: What you learn from your first few microcontroller projects tends to be general and is more transferrable across architectures than not.If you're a hobbyist or dabbler (I don't mean anything disparaging by that, of course), I'd start with Arduino, simply because there's a metric crap ton of examples out there.Alternatively, consider the ESP32 or any other individual popular micro and you'll learn about I^2C, SPI, pullups, CAN, PWM, ADC, DAC, etc as needed. Almost all of that is 90% transferrable. Getting started is more important than precisely where you start.I've got (hobbyist level) experience in Arduino/AVR and ESP8266/32, and a tiny amount of exposure on the MSP430. The hardest one, by a LOT, was the first one, just because it was first.8051 ships a lot of units for sure. I wouldn't characterize "market momentum for a long established architecture" asartificialin any way. I also wouldn't start there (though I suppose I did, back in college). I'd probably start AVR and Arduino specifically as the on-ramp.

author: ataradov
author_rank: Super Contributor
timestamp: November 05, 2018, 05:50:25 pm
content: ARM is the platform of choice for the near future. This is a generic statement and details depend on the actual application, but ARM is a safe bet if you are just looking to start with something. And don't listen to people that will tell you that ARM is harder to learn that something else.RISC-V may be a thing if chip vendors will actually start making real chips.

author: HB9EVI
author_rank: Frequent Contributor
timestamp: November 05, 2018, 07:06:56 pm
content: No doubt, ARM is the way to go; I still like AVR, also because of low pin count and very fast and simple results; but I already got quite used to STM32; and with increased need for real fast buses like ethernet, i2s, spi, the 8bit mcus are no real option anymore

author: Mr. Scram
author_rank: Super Contributor
timestamp: November 05, 2018, 07:17:36 pm
content: It was always going to end up being another one of those threads, wasn't it? The previous dozen or so ended up not giving an definitive answer, so it seems the answer is "nobody knows and it doesn't matter". Just pick one and be happy.

author: daniel5555
author_rank: Contributor
timestamp: November 05, 2018, 07:28:58 pm
content: Quote from: GlowingGhoul on November 05, 2018, 03:40:18 pmIn my opinion, it doesn't really matter what architecture it is as long as it is one of the common ones. If you know programming, this knowledge will be equally valid on almost any architecture. The same applies to learning programming - you can do that on any of those architectures.So, I think, you can just pick something that you feel most passionate about. Probably it will be be good enough for your first projects.

author: mark03
author_rank: Frequent Contributor
timestamp: November 05, 2018, 07:34:53 pm
content: What atadarov said.You might consider starting with Arduino (which I believe is moving towards ARM anyway?) if you are coming up from zero in terms of electronics and programming knowledge. If terms like "interrupt", "pull-up/pull-down", and "bus" are greek to you, this could be a good place to begin.Do beware, however, because those high-level environments can all-too-easily become barriers which prevent you from learning what you want to know. I am part of the cohort which learned microcomputer architecture from the ground up in jr. high and high school fooling around with the home computers of the 1980s. I think time has borne out that this was a pretty good education, judging by the number of embedded developers of similar age that I have worked with professionallyI am not suggesting you pick apart a Commodore 64 but you should give preference to learning simple systems exhaustively, rather than complex ones with a friendly layer on top.ARM Cortex-M (0/3/4/7/etc) is a good choice because-- it is dominant today, and will remain so for some time, having displaced almost everything else, including most of the old eight-bitters like 8051 and AVR.-- it scales from relatively slow and simple (M0) up to fast and complex (M7) with the same basic architecture, so learning it gives you a lot of bang for your buck in terms of time spent.-- the documentation is much better than some of the alternatives, e.g. ESP-anything is absolutely awfulIt is an unfortunate reality that even the simplest Cortex M0 is a lot more complex than, say, an 8051, but IMO most beginners are too afraid to just dive in. It's not as hard as you think. Vendors provide driver libraries and templates which can get you started, although you should ditch them as soon as you feel able; they are like Arduino in that beyond a certain point, they become very limiting.Edit: Like someone else said, just buying a dev kit and  a book and sitting down with the intention to "learn microcontrollers" is difficult for most people. Better to first think of a fun project that catches your imagination, then use it as a vehicle for your learning. That is how I have learned almost everything I know...

author: rstofer
author_rank: Super Contributor
timestamp: November 05, 2018, 08:18:27 pm
content: I think architecture is less important than where you are in skills.I would skip over the 8051, for now, including its derivatives. They probably survive because they are +5V logic and the automotive industry just loves them. I used the 80251 a long time ago with a Pascal compiler. It was fun, at the time, but it's the long way around to actually getting something done.If you are just beginning to think about hardware, Arduino is the answer simply because everything that can be done with an Arduino has been done and the project is out on the web (somewhere). You can also blow off the Arduino layer over the ATmega328P and just write all your own code using avr-libc (which is already included with the Arduino IDE). You don't have to use the Arduino libraries..If you understand hardware, have no problem with how the interrupt controller works, are comfortable with I2C, SPI, etc, then it makes sense to start with ARM <pick a flavor>. I started with ARM7TDMI chips like the LPC-2106 and LPC-2148. The '48 is a great chip! It has a lot of peripherals and there is a really nice collection of code atwww.jcwren.com/arm. These are old devices at this point so you might want to aim higher.Any of the ST Micro boards are pretty nice. They include 1-wire debugging (in most cases) and have a ton of peripherals. I would buy the boards that are 'mbed' compatiblehttps://os.mbed.com/platforms/My favorite little board is the LPC-1768 mbed. I can design a daughter card and just plug it in when I want external hardware of some kind (Ethernet MagJack, RS232 level changer, etc).https://os.mbed.com/platforms/mbed-LPC1768/There is always a lot of negativity when I suggest using the online compiler. Doing so means you don't have to install any tools and you can work on your code from almost any web browser in the world. The reason for 'any' is I don't know if the downloading of the binary works on machines like the ChromeBook.There are some very nice ARM libraries at the mbed site. I used their TCP/IP stack and just dropped networking into my LPC1768. I few lines of code in a simple state machine and networking was up and running. This is a really big deal! Writing an entire TCP/IP stack from scratch is a very large job.I don't know much about longevity for something like PSOC 6 (Cypress) but there are some great videos which will ultimately create a robotic arm. The arm itself isn't important, what is important is the level of the tutorials. They're great!http://www.cypress.com/training/psoc-101-video-tutorial-series-how-use-arm-cortex-m4-based-psoc-6Never bet against technology! No matter what you are doing today, several years down the road it will be different. The concepts will be the same but the hardware will change. When we were playing with 8080s and Z80s, struggling with a 64k memory space, we didn't even dream of the modern x64 processor with 32 GB of memory. Nor did we imagine programming being able to fill it up!

author: HB9EVI
author_rank: Frequent Contributor
timestamp: November 05, 2018, 08:22:42 pm
content: Isn't it always like that ? You have some idea about a project and you think how to achieve it; so if the analog world is not getting the work done on its own anymore, it time to dive into the mcus.So: you have an idea and want to make it real; what could be easier than watching for a convienient mcu, the datasheet, the toolchain and start it all up.sure, maybe it feels like crash against the wall, but still better than to just realize book examples; maybe you start with a blinky to get an idea about it, but then stay bare metal; don't get used to all those IDEs with their fancy abstraction layers - it will sooner or later turn out to be a handicap.

author: NorthGuy
author_rank: Super Contributor
timestamp: November 05, 2018, 08:34:01 pm
content: Quote from: GlowingGhoul on November 05, 2018, 03:40:18 pmShould begin from finding/defining the application of course.Quote from: GlowingGhoul on November 05, 2018, 03:40:18 pmYou cannot avoid this. The only thing you can do is not being afraid of this.You don't invest in architectures, you invest into yourself, which is platform independent.

author: legacy
author_rank: Super Contributor
timestamp: November 05, 2018, 08:41:04 pm
content: you have a problem, you think about a solution (not necessarily the best one, suboptimal is widely accepted), so you have a project, which defines constraints and goals, so you choose the MPU/DSP accordingly ...... that's should be the good way

author: legacy
author_rank: Super Contributor
timestamp: November 05, 2018, 08:47:44 pm
content: ( ... I know, I know, it's just a theory and not the final cut, people must have their reasons for this)

author: ejeffrey
author_rank: Super Contributor
timestamp: November 05, 2018, 09:24:27 pm
content: I would say the most important criteria for learning is the availability of documentation and examples, rather than any details about the architecture.I would probably say for simple applications AVR is the best here. In addition to the 700 lb gorilla that is Arduino, there are tons of "bare metal" examples with documentation, blog posts, forum threads, stack overflow examples, and so on.The availability of dev boards is also a huge deal. You can find development boards for almost any CPU, but again AVR has the best "full stack" -- you can buy an arduino, a shield with the peripheral you want, and find drivers and demo code to operate it. Many other microcontrollers have some level arduino compatible dev boards, but chances are the example code will still be for AVR.You will probably outgrow both arduino and AVR, but I still can't think of a better place to get started -- again assuming your projects start relatively simple.After that, ARM. Any time you find the 8-bit AVR constraining, go to ARM. The range available is huge from many manufacturers with a wide range of built in peripherals and from ultra-low power to high performance. There is also excellent online support, both for ARM in general and for specific families. There are many dev boards available, but chances are at this point you will be designing the micro into a larger project rather than using a dev board.

author: nctnico
author_rank: Super Contributor
timestamp: November 05, 2018, 09:29:49 pm
content: Quote from: ataradov on November 05, 2018, 05:50:25 pmI fully agree with this. There is a large selection of ARM microcontrollers with simple to understand & use peripherals so skip the 8 bit junk which is overly constrained when it comes to speed and memory size. I started out with 8051 but I would have happily given up my left nut if I had access to ARM microcontrollers back in the old days. It would have made life so much better and easier.

author: emece67
author_rank: Frequent Contributor
timestamp: November 05, 2018, 11:34:00 pm
content: .

author: MT
author_rank: Super Contributor
timestamp: November 06, 2018, 12:39:40 am
content: Quote from: GlowingGhoul on November 05, 2018, 03:40:18 pmSimply dont read articles they are mostly biased in one way or the other.QuoteUndoubtedly ARM. Pick one of the simpler ones ST NXP whatever and start there , its the peripherals you are going to wrestle with.QuoteBelongs to the past, forget it no matter what. Ask your self; its 2018 why would i wrestle with 8 bit computing when its so much easier with 32 bit, and your done and move on with the future , past belongs to long dead engineers!