MCUdude / MiniCore

Arduino hardware package for ATmega8, ATmega48, ATmega88, ATmega168, ATmega328 and ATmega328PB
Other
994 stars 245 forks source link

ATmega328PB and the PWM output PB1, PB2 and PB3 #301

Closed 13LenD closed 6 months ago

13LenD commented 6 months ago

I use the ATmega328PB in combination with the arduino IDE 2.3.2 The ATmega328PB has the bootloader minicore! Everything works properly except the PWM outputs PB1, PB2 and PB3 What else do I need to do to activate these outputs?

The other PWM outputs do work on a simple code as: ` void setup() { // put your setup code here, to run once: pinMode(PD3, OUTPUT); }

void loop() { // put your main code here, to run repeatedly: analogWrite(PD3, 128); ` But if I change the code to output PB1, for example, the output gives no signal? Do I need a special library to activate these outputs and if so which library should I choose?

MCUdude commented 6 months ago

You'll have to use PIN macros:

https://github.com/MCUdude/MiniCore?tab=readme-ov-file#pin-macros

13LenD commented 6 months ago

Thanks!