ATmega328p is legendary but the AVR64DB32 is a far superior upgrade in almost every way that matters.
64Kb Flash, 16kB SRam, full 24Mhz speed at 1.8V minimum power, 12bit 130ksample ADC, 2x Rail to Rail OpAmps for free (3x on higher end versions), etc etc. Better timers, USART, DAC, Comparator, Zero crossing detector, 50mA per pin with full 1.8V to 5.5V range, 300mA total GPIO source/sink, multiple VRefs, 4x 3-LUTs + 2x JK Flipflops for glue logic, event routing system (peripheral-to-peripheral routing while under deep sleep).
And... AVR64DB32 is cheaper at Digikey than ATMega328pb.
So faster, cheaper, more capable, lower power (sleepwalking peripherals), more flash, better analog components, what's not to like?
I realize that Arduino Uno has made ATMega328p absurdly popular. But AVRs have had over 10 years of upgrades since then. And so has the competition (TIs MSPM0 Cortex M0+ for like 50 cents is very competitive, as is STM32C0 line or STM32U5 low power line)
-------
If you have a legacy design using legacy ATMega328pb parts, well... the hardware drivers have changed in AVR DB line.
But it's all AVR Assembly/machine code. Your libraries and code will otherwise work with just a recompile. I get that peripherals are harder to port but ... Legacy Peripheral driver is pretty much the only reason to stick with the 12+ year old ATMega328pb.
The embedded world moves slower than consumer chips, but it still moves! After a decade, the newer embedded chips are like night-and-day superior over decade+ old models.
> And... AVR64DB32 is cheaper at Digikey than ATMega328pb.
Sure, you save about $0.80 off your BOM, but currently DigiKey has a stock of over 200k ATMEGA328P (in 31 P/N), whereas searching for any of the AVR64DB32 family (of which there are 8 P/N), returns 0 available stock. That savings and feature bump is nice, but if you can't get any, whats the point of designing in this part?
Since this is a tutorial for newbies, I'm intentionally using a chip with years of code, flashing, and peripheral circuit examples. It's also compatible with the Arduino Nano pinout so students can add peripherals with outside circuit examples.
For personal projects, I also prefer using fancier chips like the ESP32 series or the new generation of ATtinys.
dragontamer|2 years ago
64Kb Flash, 16kB SRam, full 24Mhz speed at 1.8V minimum power, 12bit 130ksample ADC, 2x Rail to Rail OpAmps for free (3x on higher end versions), etc etc. Better timers, USART, DAC, Comparator, Zero crossing detector, 50mA per pin with full 1.8V to 5.5V range, 300mA total GPIO source/sink, multiple VRefs, 4x 3-LUTs + 2x JK Flipflops for glue logic, event routing system (peripheral-to-peripheral routing while under deep sleep).
And... AVR64DB32 is cheaper at Digikey than ATMega328pb.
So faster, cheaper, more capable, lower power (sleepwalking peripherals), more flash, better analog components, what's not to like?
I realize that Arduino Uno has made ATMega328p absurdly popular. But AVRs have had over 10 years of upgrades since then. And so has the competition (TIs MSPM0 Cortex M0+ for like 50 cents is very competitive, as is STM32C0 line or STM32U5 low power line)
-------
If you have a legacy design using legacy ATMega328pb parts, well... the hardware drivers have changed in AVR DB line.
But it's all AVR Assembly/machine code. Your libraries and code will otherwise work with just a recompile. I get that peripherals are harder to port but ... Legacy Peripheral driver is pretty much the only reason to stick with the 12+ year old ATMega328pb.
The embedded world moves slower than consumer chips, but it still moves! After a decade, the newer embedded chips are like night-and-day superior over decade+ old models.
KANahas|2 years ago
Sure, you save about $0.80 off your BOM, but currently DigiKey has a stock of over 200k ATMEGA328P (in 31 P/N), whereas searching for any of the AVR64DB32 family (of which there are 8 P/N), returns 0 available stock. That savings and feature bump is nice, but if you can't get any, whats the point of designing in this part?
karmanyaahm|2 years ago
For personal projects, I also prefer using fancier chips like the ESP32 series or the new generation of ATtinys.