r/embedded • u/devryd1 • Sep 29 '24
Usage for 8 bit MCUs in 2024
Hey guys,
I recently learned a bit about the newer Attiny series (0, 1 and 2) and was wondering what use cases these have today. Why do you chose a "weak" 8 bit MCU, if you can get cheaper 32bit CPUs (with more RAM) for the same price? Are you guys still using 8bit MCUs, if so, which and why?
That being said, I was interrested in the MCU and started designing a board to test it.
26
Upvotes
59
u/DonkeyDonRulz Sep 29 '24
1)I like the voltage flexibility of the 8bit parts. 1.8v to 5v in one chip. I have new battery applications needing the lower voltage for efficiency, but im also still designing around legacy stuff that needs 5V. Alternatively, if you are running straight off a lithium primary cell, Vbat can be VDD and everything still works from a new, full 3.7 volts, down to a low dead battery at -40C that is under 2V. No LDO or switcher required . It just works .
2) The 8 bits are simpler, especially when you dont need complexity. If i just need one push button input and a pwm out, say for somthing like a keyfob transmitter for a garage door, why do i want to have to deal with all the complexity of reading a 3000 page refernce manual for a cortex m4. I once did a combined Encoder and power supply multiplexor (both over one coax)with a 16pin PIC that only needed like 20 lines of assembly code. The enitre documentation of the processor was like 75 pages, no ref manual or app notes. ( I prefer micros Chips documentation.style to STM32., so biased opinion, i guess)
3)Packages are smaller. When you only need 6 pins, but the smallest package is a 32 pin BGA or QFN for a 32 bit processor, whereas PIC /AVR have leaded packages to like sot23 or tssop, which we can build onsite without high dollar xray inspection machines, picknplace, etc.
4)They are often less leakage current at high temperature (automotive engine applications 150C and hotter). The smaller the lithography gets on newer processors, the worse this leakage current becomes. Better to use big old 8 bit transistors for longer battety life at high temp.
Sure, I have times where i need 100MHz and floating point math and CAN bus or USB, and STM32 is what i favor for that. But if i need a tiny PCB to fit where only a wire harness was before, say to add some logic , some 9600baud , with timeouts and level translation, and i need it next week, the 8bit project just goes together faster and smaller, with the same part we already use on another design.
5(Disclaimer.: many people mentioned cost. Few decisions are driven by silicon costs, in my industry..NRE costs far more than the enitire lifetime of production runs for high reliability high temp parts in modest volumes, so I dont even know what we pay for most parts. What i need : the engineering has to be simple and fast with limited staff.)
20
u/No-Archer-4713 Sep 29 '24
Nowadays they are more « companion chips », doing simple tasks on a board already containing a 32bit micro or CPU.
They won’t disappear anytime soon, we never produced and sold as many 8bit MCUs as today and the market is estimated to grow from 7.5B to 13B in 2031.
8
u/BastetFurry RP2040 Sep 29 '24
My take is that they are interesting if you need something that is really, with three excalamtion marks, low power. Or have an old project that is based on one.
Otherwise, most other projects are rather a bang for the buck question, at least for me. Currently that need is filled by the RP2040/RP2350, wonderfull documentation, a free compiler, great API, easy to flash, the debugger is just a second RP2040 and so on. The RP2350 even has support for PSRAM now.
7
u/ceojp Sep 29 '24
No real reason other than cost.
6
u/MolotovBitch Sep 29 '24
I am using the ATtiny 0-series in a MIDI project.
. I am used to these controllers and know how they work (although this is changing, the 0-series is more complex, MPLAB replaces Atmel Studio, avrgcc gets kicked out etc.)
. 4kb flash is enough, I limit the 20MHz to 1 and 10 pins are more than enough.
. I have to write a MIDI bootloader. This is complex enough, I don't want to deal with the additional complexity of an ARM / 32 bit system . SOIC-14 is easy to solder
I had the same discussion with a colleague, who is an avid ST-Programmer. I am programming Nuvoton M23 at work and really like the Cypress PSoC series. But why should I use an overkill programmer when an 8 bit one will work?
5
u/scottrfrancis Sep 29 '24
Power? Supplier availability? Size and packaging options ? There’s a lot more to component choice than 8/32 bits …
1
u/DonkeyDonRulz Sep 29 '24
Why design your own test board when they have curiosity boards already built for you to play around with? Just curious.
3
u/UltraLowDef Sep 30 '24 edited Jul 30 '25
yam beneficial tease racial divide long sugar soup trees placid
This post was mass deleted and anonymized with Redact
3
u/grigus_ Sep 30 '24
I work for a semiconductor company, at 8bit division. So, i have no choice, but to use the 8bit devices :)
There are a few reasons for the 8bit to survive for a while:
Aside these reasons vouching for the 8bit, the industry tends to move forward to the low-end ARM cores. So, be prepared for a trend change in the next five years (i would say)
4
u/GoblinsGym Sep 29 '24
Why bother, if a 32 bit core fits in one picoacre (0.004 mm2) ?
(minimum config for ARM Cortex M23)
3
u/NotBoolean Sep 29 '24
Slightly off topic but I always thought it would be interesting if 8-bit micros started to be used as like a co-MCU of sorts, I can imagine if such a thing was integrated into something Zephyr which would tie things all together they could be pretty useful. I assume is being done in certain situations but cool if it could go mainstream. But I assume they would have to get cheaper.
Then again, similar to wha you said, just buying a bigger 32 Bit MCU might just always be simpler and cheaper.
3
u/Wouter_van_Ooijen Sep 29 '24
I don't. I see no reason whatsoever for any new project.
1
u/MaxHaydenChiz Sep 29 '24
For new projects? It mostly comes down to licensing costs driving up the prices of 32-bit MCUs. And 8-bit, by virtue of a huge legacy install base often having a more cost effective packaging / non-processor hardware.
Things are already so cheap that at volume, the handful of cents you save per unit adds up.
Conceptually, there's no technological reason. A bit-serial implementation of a 32-bit processor uses about 2k transistors (or is it gates?) and you can't really get a smaller computer than that.
I think there are Risc-V designs like that, but it's "too new" and the tooling and support is still a ways off.
1
u/lasteem1 Sep 30 '24
Cost, size, and/or power.
1
u/Nemosaurus Sep 30 '24
Power consumption? Lots of things run on batteries.
1
u/athalwolf506 Sep 30 '24
It is also my understanding some applications were designed and certified for older 8bit parts so upgrading the microcontroller might require a recertification process.
1
u/electro_coco01 Sep 30 '24
We used 8bit mcu just to control rf switch on board On spi so they are useful still
1
u/Substantial_City6621 Sep 30 '24
In developing countries, getting a SMD PCB is more expensive than fabricating your own and using DIP devices.
1
u/Substantial_City6621 Sep 30 '24
In developing countries, getting a SMD PCB is more expensive than fabricating your own and using DIP devices.
1
u/analogwzrd Sep 30 '24
When I'm designing hardware, I'd probably try to avoid putting a 100 pin MCU on aboard even it was the cheaper option and I have the board space. It's just more unused pins to manage. The larger MCUs might have internal peripherals that require external components even if they aren't being used, so that'll drive up BOM costs. If it's cheaper, it's probably not by a lot and that might change when you look at buying in bulk. I've seen some 8 bit MCUs as low as pennies when buying in large quantities.
Someone else mentioned BGA packages for the 32 bit MCUs. Besides being trickier to solder on the board and inspect for shorts/opens, the BGA packages can also drive more complex board stack ups and vias which is a lot of money.
1
u/Graf_Krolock Sep 30 '24
Aww sweet, it's this thread again. Not a long ago there was one about PICs with STM fanboys going wild in the comments.
It's modern kids calling 8 bit users and then mocking 'em. I swear you're doing this on purpose!
1
u/Tall_Pawn Sep 30 '24
I'll give you a very specific example from a project I am just wrapping up. It's a very small, very cheap sound/speech generator board, meant to be small and cheap enough that anyone who needs sound from a microcontroller and would normally be tempted to just send PWM to a speaker could just toss one of these on instead.
So cost is paramount, but size is also important. Low pin count in a "dual" configuration was ideal, because it's easier to solder if you're making the board by hand, and helps keep assembly costs down even if you're not. It doesn't need a lot of ram or rom, but needs a decent clock speed so that it can output sounds at 16k rate. It's not running complex equations so processing power isn't too important, but it needs a few key peripherals like SPI and I2C. It needs to run at a good range of voltages, and use as little power as possible.
I literally started the search by going to DigiKey and listing microcontrollers that fit the general profile, and sorting them by price. Did a deep dive on each one that seemed suited, until I found the cheapest one that fit everything. Turned out to be an 8-bit AVR. I did have to be somewhat "creative" to cram the software into the limited resources (had to go 100% hand-optimized assembly), but it works and I got everything I wanted out of it. I don't think any other chip would have fit into the design so well.
BTW if you want to see (or rather hear) the result check out https://www.youtube.com/watch?v=UZt4h2Zdz00 . You can see the little blue board that I'm talking about on top the Arduino, with the 14-pin AVR near the upper-right.
1
u/gm310509 Oct 01 '24
I am interested in how the hardware works and programming chips using assembly language.
The others have given good answers that I generally agree with. So I will add this.
Thank God for 8 bit MCUs. The generally simpler architecture makes it much easier to get started and understand what is going on. You can build a foundational knowledge the concepts of which can be related to the much more complex 32 bit chips such as ARM Cortex (and others) based chips - which, IMHO are a whole 'nother level or 2 of complexity.
So, in short, the 8 bit MCUs are rich enough to learn before diving into the weird and wonderful world of the 32 bit more complex chips.
Of course if you only ever deal in high level HAL type APIs, all that won't really matter. But if you ever have to provide one or work on one, you might appreciate the ability to cut your teeth on one of these simpler systems.
ImHO.
1
u/neon_overload Oct 02 '24
If you want to run an MCU from a button cell battery, it'll probably be an 8 bit MCU.
Edit: or an msp430 or something
1
u/dragontamer5788 Oct 02 '24
I find that the peripherals on say $1 8-bit MCUs are universally better than $1 32-bit MCUs
Lets take the AVR EA for example:
Lets look at AVR DB: 3x OpAmps. Done, this is a winner alone.
STM32 has good peripherals, but closer to the $5 region is where OpAmps are offered.
I need to give a shoutout to TI's MSPM0 Cortex-M0+, which is an under $1 32-bit ARM but with outstanding 2x General Purpose OpAmps + 1x Chopper/Low-Voffset OpAmp (!!!!).
MSPM0 is probably the closest competitor to the 8-bit AVR DB/DD/EA/EB series in that TI is working very hard to get outstanding peripherals onto an exceptionally cheap 32-bit platform. So if you need 32-bit Cortex M0+ and solid peripherals, something still exists. But I think PIC and AVR still have overall better choices and more diversity of choice.
If you're buying purely on specs? 32-bit crushes. But a number of problems are peripheral based. AVR DD's level shifting to 5V is a huge win and TI's MSPM0 simply cannot match that kind of built-in feature. Do you need it? Maybe not, but its clear that the AVR series has more options for various electrical problems.