5 ms·
It depends on your volume and target price. Are you trying to put a microcontroller, a battery, a couple switches, and some LEDs/speakers in an injection-molde
by LeifCarrotson 4y ago
It depends on your volume and target price.
Are you trying to put a microcontroller, a battery, a couple switches, and some LEDs/speakers in an injection-molded, basically disposable, consumer good to sell through McDonalds Happy Meals, Walmart, or AliExpress, and you plan to build hundreds of thousands to hundreds of millions of units? Do you expect to program in assembly, or a custom subset of something C-like that obviously won't include the standard library but might not even include something as fundamental as any values on the call stack for arguments or returns, happily trading a couple weeks of developer frustration if it saves $0.01 per part? No, the ATTiny doesn't really make sense for you....find a Chinese 8051 or Paduk core you can epoxy down chip-on-board style, aiming for the absolute bare minimum of peripherals and costs.
Are you producing some high-value commercial good in small quantities? Do you place a high value on developer productivity, want a generous assortment of peripherals and interrupts including communication and reasonably performant DAC and ADC onboard, a comfortable C library, a UPDI online debug interface, vendor support and thorough documentation in English? The ATTiny may be for you, or maybe you want an MSP430 or Cortex-M0, or maybe you want to spend $1 more per unit (worth 200 man-weeks of developer frustration in the paragraph above!) and get something with 10x the Flash and pin count.
A good comparison of some similar microcontrollers (including the ATtiny 1-series) written in 2017 is here:
https://jaycarlson.net/microcontrollers/ https://jaycarlson.net/microcontrollers/
Note that this article was specifically tailored to parts just barely under $1, and didn't focus on the very cheapest parts.
HN has hosted discussion of this article some 4 times in the past 5 years, originally here:
https://news.ycombinator.com/item?id=15633785 https://news.ycombinator.com/item?id=15633785