Request for ATmega328PB
Hi Carlos,
Any chance that you could add the "PB" variant to your library?
Regards, Martin
I don't have any part to test with, so I'd welcome a pull request adding support.
From a quick look(*), it seems the ATmega328PB is not a minor variation of the ATmega328/328p. It looks like it's backwards-compatible though (code level and, I'm assuming, fuse settings), so it's likely that adding this to avr/boards.txt would provide basic support:
# Signature: ATmega168pb
# Specs: https://www.microchip.com/wwwproducts/ATmega328PB
atmega168.menu.cpu.atmega168pb=ATmega168pb
atmega168.menu.cpu.atmega168pb.build.board=atmega168pb
atmega168.menu.cpu.atmega168pb.build.mcu=atmega168pb
However, to enable the extra features, there's more to it. You'd need an "hardware" package for the Arduino IDE (there seems to already be a few) to add library support and reference the proper board type from avr/boards.txt, and a different set of fuse configurations.
(*) https://www.pololu.com/file/0J1464/Atmel-42559-Differences-between-ATmega328P-and-ATmega328PB_ApplicationNote_AT15007.pdf