AltSoftSerial icon indicating copy to clipboard operation
AltSoftSerial copied to clipboard

Add Support for ATMEGA328PB Please

Open maesoph opened this issue 3 years ago • 2 comments

Description

Describe your problem.

Does not appear to have support for ATMEGA328PB.

Steps To Reproduce Problem

Please give detailed instructions needed for anyone to attempt to reproduce the problem.

Just try compiling for ATMEGA328PB

Hardware & Software

ATMEGA328PB

Errors or Incorrect Output

Error while detecting libraries included by C:\Users\maeso\Documents\Arduino\libraries\AltSoftSerial\AltSoftSerial.cpp

maesoph avatar Mar 06 '22 21:03 maesoph

Hi, i had same problem...

Using MCUdude/MiniCore witch 328PB variant selected i was unable to compile the program with AltSoftSerial library I got many errors like:

AltSoftSerial_Boards.h: 136:2: error: #error "Please define your board timer and pins" #error "Please define your board timer and pins"

AltSoftSerial.cpp: 74:3: error: 'CONFIG_TIMER_NOPRESCALE' was not declared in this scope CONFIG_TIMER_NOPRESCALE() . . .

But solution seems to be very easy. In file ...\libraries\AltSoftSerial\config\AltSoftSerial_Boards.h change line (85) : #elif defined(__AVR_ATmega168__) || defined(__AVR_ATmega328P__)

to:

#elif defined(__AVR_ATmega168__) || defined(__AVR_ATmega328P__) || defined(__AVR_ATmega328PB__)

Save the file, restart arduino and try.

Hope it helps

Matejisko avatar Jan 04 '23 09:01 Matejisko

@Matejisko - Do you know what is different with the "PB" chip? Please confirm the code did work when you ran it on a real PB chip and I will put this change into the code.

PaulStoffregen avatar Jan 04 '23 20:01 PaulStoffregen