The old ATMega328 is obsolete. That's my point. There's a ton of chips that are better than ATMega328.
But if we're talking about _MODERN_ chips, like AVR64DD32, the modern successor to ATMega328, with AVR assembly language, GCC support and all that jazz...
EDIT: AVR64DD32 is basically a "modern ATMega" btw. Its not an ARM, its an AVR processor. Is this the point of confusion?
* Running directly off of 5V USB power without any voltage regulators is a neat trick. No ARM Cortex M0+ part I'm aware of goes above 3.6V (they're designed for Li-ion cells). Dropping down to 1.8V is also a neat trick, the AVRs have a very wide practical range of voltages.
* Dual power supply. PortC of AVR64DD32 runs off a 2nd power supply. So the AVR64DD32 can run off of 5V USB power, and with an external LDO regulator can have PortC running 3.3V. (Aka: integrated level shifter). You know, for all of that annoying 3V crap that you need to integrate with 5V other crap.
* The big-brother, AVR64DB32 (the DD turns into DB. Confusing, yes, I know), has 3x OpAmps. Meaning you don't even need a power supply anymore. You can power PortC / secondary I/O lines from the integrated OpAmps on the AVR-DB.
If you upgrade to the bigger AVR DB in the series to $2.00 to $3.50... you get 3x rail-to-rail OpAmps with integrated resistor ladders and suddenly you're in a very flexible mixed-signal world.
I think STM32G4 chips have integrated OpAmps. But these are $7+ chips and a ARM Cortex-M4 (much more expensive / complex / bigger than the M0).
> M0s and M3s are cheap and plentiful and usually better specced for the price
Which one? AVR64DD32 is 64kB of Flash and 8kB of SRAM for $1.60.
Cheapest STM32L0 I can find is $1.82 and only has 2kB of SRAM. And it doesn't go to 5V, doesn't have integrated level shifters, op-amps, or any of the other neat tricks... (And STM32L0 is a _very_ competitive Cortex-M0+ line in my experience).
Like, we all want to just code our way out of problems. But sometimes, you have a 3V thing that you need to connect to a 5V thing. And AVR DD is the perfect tool for that.
------
EDIT: Ah right. And ATMega328 can still sink 20mA to fully turn on an LED without any MOSFETs / external amplifiers. I think PIC is the only other major line of chips that has this feature. AVR-line is legendary for its current source / current sink strength.
I guess I'm showing my "hobbyist" bias, because I was looking at Digikey-pricing quantity 1, not bulk prices, with my discussion earlier. So that's still in the general price range (XMC1 is similar to STM32L0). Not that the price point matters too much, but just trying to keep things apples-to-apples here.
But the 1.8 to 5.5V support and 50mA is _definitely_ impressive. Its not very common in my experience to see such a wide voltage range on an ARM chip (though it is somewhat common in PIC / AVR / 8051 8-bit uCs).
I'd still say that AVR DB has the advantage though, because 3x OpAmps can do so so much. The marketing page for that XMC1 shows off a SMPS DC-DC voltage converter for example with the XMC1 50ns comparator. Certainly nifty but...
I'll one up that with a true-and-proper DAC and a rail-to-rail OpAmp controlled by the AVR DB series. (The cheaper AVR DD also has a DAC, but is missing the OpAmp). There's just things you can do with a 5MHz OpAmp / analog control that you can't do as well with digital logic. I'm willing to bet that the current control / response time off of the 5MHz OpAmp from the AVR DB will beat the pants off of any digital logic the XMC1 tries to do.
And while 50mA is huge, the most I've seen in this class of chips... the AVR DB OpAmp is specified for ~30mA current source / sink. So while its smaller than the 50mA pins of the XMC1, its still rather strong.
------
> The upshot there would be high commonality with XMC4 (Cortex-M4F), and general commonality with other Arm platforms.
Yeah, that's definitely the biggest advantage to ARM in general. It scales really high.
8-bit MCUs scale lower though... down to 32B, bytes (not kB) of RAM... and other such designs. This ~$1 to $3 price point is really a battle between "the biggest 8-bits" (PIC/AVR/8051) and "the smallest 32-bits aka ARM" (with TI being weird with a 16-bit MSP430 sitting comfortable)
If you're thinking of "scaling down" to sub $1 (or more importantly: lower power designs), 8-bit wins. If you're thinking of "scaling up" to $10 (or higher-power, more CPU-intensive designs), 32-bit wins.
--------
EDIT: Honestly, the coolest thing about this XMC1 seems to be the LED controls at the XMC1202 chip, closer to the $3 price point. The XMC1100 are a bit feeble / low end and weaker than the 8-bits I'm familiar with at its ~$2ish price point.
9-channels of LED with 12-bit exponential voltage controls means you can probably offer a full 32-bit color off of those RGB LEDs. And with 50mA per pin, you can probably just drive those LEDs without any resistors.
EDIT: Ah, looks like 50mA pins are the "high current" pins. Only 6 high current pins on the XMC1100. The other I/O pins are 10mA. So resistors are still needed, but that's still a lot of nifty control for those LEDs.
That reminds me of https://jaycarlson.net/microcontrollers/ "$1 microcontrollers" with all of the weird and wonderful variations. Probably not actually $1 after the chipaeddon tho.
Yeah, its those stories hitting the top of Hacker News that got me looking at modern uCs again, and thinking of a hobby-project to do with 2022-era tools.
That page is still a bit out-of-date now. 2022-era uCs have taken a sizable step forward compared to 2018-era... though inflation / chipaeddon has made everything more expensive.
But peripherals, power-usage, Flash/SRAM, etc. etc. are all getting better across the board. Its just one of those 'tredmills', you can never really be an expert on the market, cause the market of chips keeps changing so quickly.
Oh, chipaggedon... I was few weeks off trying the assembly service (think it was on seeed studio?) of small dev board, and then I realized near nothing I had on it was still in stock. Even managed to run Rust on the previous breadboard iteration of the project.
Year and half later I got all the parts finally delivered...
> But peripherals, power-usage, Flash/SRAM, etc. etc. are all getting better across the board. Its just one of those 'tredmills', you can never really be an expert on the market, cause the market of chips keeps changing so quickly.
Sure but you can stay on same chip family for 10+ years and just grab new part when you need features. Especially on hobbyist level there isn't that much reason to chase the latest and greated
But if we're talking about _MODERN_ chips, like AVR64DD32, the modern successor to ATMega328, with AVR assembly language, GCC support and all that jazz...
EDIT: AVR64DD32 is basically a "modern ATMega" btw. Its not an ARM, its an AVR processor. Is this the point of confusion?
* Running directly off of 5V USB power without any voltage regulators is a neat trick. No ARM Cortex M0+ part I'm aware of goes above 3.6V (they're designed for Li-ion cells). Dropping down to 1.8V is also a neat trick, the AVRs have a very wide practical range of voltages.
* Dual power supply. PortC of AVR64DD32 runs off a 2nd power supply. So the AVR64DD32 can run off of 5V USB power, and with an external LDO regulator can have PortC running 3.3V. (Aka: integrated level shifter). You know, for all of that annoying 3V crap that you need to integrate with 5V other crap.
* The big-brother, AVR64DB32 (the DD turns into DB. Confusing, yes, I know), has 3x OpAmps. Meaning you don't even need a power supply anymore. You can power PortC / secondary I/O lines from the integrated OpAmps on the AVR-DB.
--------
I'd say typical M0+ parts are at the $2.50-ish price point. AVR DD has some neat tricks, and scales down to under $1 in bulk ($1.09 for 1: https://www.digikey.com/en/products/detail/microchip-technol...)
If you upgrade to the bigger AVR DB in the series to $2.00 to $3.50... you get 3x rail-to-rail OpAmps with integrated resistor ladders and suddenly you're in a very flexible mixed-signal world.
I think STM32G4 chips have integrated OpAmps. But these are $7+ chips and a ARM Cortex-M4 (much more expensive / complex / bigger than the M0).
> M0s and M3s are cheap and plentiful and usually better specced for the price
Which one? AVR64DD32 is 64kB of Flash and 8kB of SRAM for $1.60.
Cheapest STM32L0 I can find is $1.82 and only has 2kB of SRAM. And it doesn't go to 5V, doesn't have integrated level shifters, op-amps, or any of the other neat tricks... (And STM32L0 is a _very_ competitive Cortex-M0+ line in my experience).
Like, we all want to just code our way out of problems. But sometimes, you have a 3V thing that you need to connect to a 5V thing. And AVR DD is the perfect tool for that.
------
EDIT: Ah right. And ATMega328 can still sink 20mA to fully turn on an LED without any MOSFETs / external amplifiers. I think PIC is the only other major line of chips that has this feature. AVR-line is legendary for its current source / current sink strength.