Page 1 of 1

ATMega328P vx. ATMega328PB ?

Posted: 20 Jan 2022, 17:58
by ke1g
Mouser doesn't seem to have the P version (some of my boards are coming without) but the price on the PB version seems good ($1.44 for the 30 pieces that I need). Web search finds a document saying that while not a drop in replacement, it's functions are backward compatible and existing code will work, see: https://www.pololu.com/file/0J1464/Atme ... T15007.pdf

It seems to have a few new features, higher numbers of serial interfaces, and peripheral register E.

The pins for PE0 and PE1 are additional GND and VCC pins, respecrively, on the P version, and I assume that the board wires them that way (I haven't dipped into the Gerbers yet, and my boards are yet to arrive). But I suspect that they power up open "tri-stated", and if necessary I could snip those pins.

So I'm wondering if there's a known reason that the PB version shouldn't work, or if they're known to consume more current, or some such, or if anyone has tried them.

Bill

Re: ATMega328P vx. ATMega328PB ?

Posted: 20 Jan 2022, 20:04
by dl8dtl
Microchip renamed the appnote, so this is the new "official" URL:

https://ww1.microchip.com/downloads/en/ ... T15007.pdf

And that says: "The code that is available for your existing ATmega328 variants
will continue to work on the new ATmega328PB device."

So you ought to be able to use it. And yes, all GPIOs power up configured as inputs on AVR MCUs.

Re: ATMega328P vx. ATMega328PB ?

Posted: 20 Jan 2022, 20:17
by dc8lz
Hi!

Manual already soldered one on an pcb with positive results.
If I remembered right he had to flash the bootloader with ... -p 328pb... but later on the final firmware with -p 328p. In general he gives us group buyers green lights. But I tried to catch the 328p and payed some $$$ more. First round 9,90 USD(!!!) and in the second about 4,50USD. But temporary there were only three (mostly none) on stock and the highest price was 15USD. I guess no one ordered for this price...

But back to your question: Yes, right now the pb is listed as an replacement by Manuel in the group buy forum.

73, Stephan

Re: ATMega328P vx. ATMega328PB ?

Posted: 20 Jan 2022, 21:35
by dl8dtl
dc8lz wrote: 20 Jan 2022, 20:17 If I remembered right he had to flash the bootloader with ... -p 328pb... but later on the final firmware with -p 328p.
No surprise. When flashing the bootloader, you operate against the real ATmega328PB with its signature.
When using the bootloader, it probably pretends to be an ATmega328P then. Well, if the bootloader were a little smarter, it could read out the real device signature, and return that one when being asked for, instead of a hardcoded value …