5 ms·
Why are 8bit microcontrollers still a thing?
by KingLancelot 3y ago
Why are 8bit microcontrollers still a thing?
- PumpkinSpice 3y agoIt's a pretty interesting question, even if a bit tangential to the article! Their main advantage is the comparatively low transistor count. The chips can be made cheaply and don't need cutting-edge fabs. This also makes them exceptionally power-efficient and tolerant of a wide range of supply voltages, so they're easier to integrate into many designs. Just as important, they are far easier to master. Single-cycle instruction execution, single chip-wide clock, simple interfaces to all peripherals. If you don't have an OS to abstract it all away, most of the contemporary 32-bit platforms are a serious pain. Adjusting clock speed on a typical Cortex-M chip requires following a carefully-choreographed sequence of steps, possibly fiddling with flash wait states, various bus clocks, PLLs, and so on. On an 8-bit MCU, you just flip a bit or two. It's a weird misconception that "8-bit" means antiquated or slow. Modern 8-bit MCUs run at high speeds, have plenty of fast memory, and integrate all kinds of cool on-die peripherals - DACs, ADCs, op-amps, DMA controllers, USB controllers, and so on. And in a good majority of embedded applications, they are enough. Of course, there's nothing sacred about 8-bit ALUs, so I wouldn't be surprised if 32-bit ALUs eventually take hold in this market segment. But the replacements would need to preserve that "I can learn this in a weekend" property that isn't preserved in most of the high-performance 32-bit chips available today.
- sweetjuly 3y ago> This also makes them exceptionally power-efficient ... > Single-cycle instruction execution For what it's worth, single cycle execution is really a detriment to power efficiency. There is an optimal logic level per pipeline stage for CMOS processes which will minimize power (and it's usually quite small!). Extremely deep pipelining lets you hit a higher Fmax, but if you don't crank up the frequency you will often save quite a bit of power.
- KingLancelot 3y agoI appreciate your thorough answer, USB is pretty surprising, but just 256 byte address space, and that needs to take into account NULL (I assume?), and various hardware devices represented in the address space, I just don’t get how it’s possible. Honestly even 16 bit is tiny.
- jhgb 3y ago8-bit CPUs typically have a 16-bit address space though.
- j16sdiz 3y ago8bit MCU does not meant it only have 8bit address space. STM8S007xx operates on 8bit words, but have 8/16/24bit address space
- PumpkinSpice 3y agoAs others are saying, "8-bit" doesn't mean 8-bit address space. It refers to the ALU "word" size instead - i.e., how many bits you can add, subtract, multiply, or divide in a single step. (Larger types are possible, you just need to do the operations in steps, just like 64-bit math on 32-bit platforms.) Even in the 1980s, most 8-bit microcomputers had at least 64 kB memory. Today, many AVR chips will have 145 kB of memory (flash + SRAM + EEPROM), and pretty much arbitrarily more can be installed externally.
- RetroTechie 3y agoAnd many 8-bit architectures allow some registers to be used in pairs. Or have some >=16-bit registers for specific operations (eg. indirect memory addressing).
- nxobject 3y agoI'm curious, and knowing nothing about the determinants of power draw and node process: wouldn't a "nearer-to-cutting-edge" fab process, though, still end up producing processors that draw even less energy? Or has that not been a goal of recent semiconductor progress?
- RetroTechie 3y agoThe silicon that drives IO pins & oscillator(s) requires some physical size (for one, due to ESD protection reasons), and requires X amount of power. A complex, modern cpu can consume many times that, so cutting edge process is useful to minimize overall power use. With small/simple parts like a uC, not so much. So the cost/part, other considerations, and whatever vendor or silicon process provides that, is what matters. Here, power savings come from sleep modes, disabled peripherals & (maybe) reduced or even stopped clocks. Not so much reduced feature sizes in the IC.
- contingencies 3y agoAlso the supply chain doesn't vanish for multiple years every time a single vendor fab burns down.
- unsated 3y agoIn addition to low power and unparalleled reliability, the microcontroller make it possible to build a realtime system.
- tremon 3y agoYou don't need a microcontroller to build a realtime system, it could work equally well on an ARM or RISC-V machine. Determinism is key, not feature set; however, you will want to avoid modern features such as dynamic frequency scaling or the x86 system management mode that operate outside of the control of the operating system.
- unsated 3y agofair, I left out what I really wanted to say. The simplicity of a microcontroller means it's hard to shoot yourself in the foot when building realtime systems.
- coder543 3y agoIt’s worth mentioning that the linked article was written over a decade ago. - Even today, 8-bit MCUs can be significantly cheaper than 32-bit MCUs. A lot of microcontrollers are used for very simple tasks that simply don’t need anything more than what an 8-bit MCU can do. Although, these days it looks like 16-bit MCUs are comparable or sometimes cheaper when looking at Mouser and DigiKey? RL78-S1 may or may not count as 16-bit. I’m not familiar with it, and seeing some conflicting info. - Plenty of legacy designs certainly continue to get manufactured, since updating the design and software to support a more advanced/cheaper processor would both require requalification of the product and require engineering time. - If you need the absolute lowest power consumption, a simpler, smaller, slower core can be helpful. - Existing expertise/familiarity
- squarefoot 3y agoThey're smaller (as in transistor count) and draw much less current than more powerful ones, which in some context (embedded/industrial, etc) is quite important. For simple tasks such as "read a sensor and if value isn' between values X and Y send this message over serial port and turn on relay on GPIO4" anything more than a smallish 8bit (sometimes even less) uC would be a huge waste of resources and potential source of problems since every piece of hardware or line of code added could hide a potential bug, therefore one adds only what is absolutely necessary, and that includes an OS and the beefier hardware required to run it.
- petra 3y agoOld processes have much lower static current(which is often dominant in mcu designs). building 32-bit mcu's using old processes is expensive.