Attiny406 and Arduino Framework, error 'PIN_C0' was not declared


I try to define the Pins of Attiny406 with Arduino, but with Pins from PortC and B I receive errors.
Are there other definitions I could use?

and here my platformio configuration:

platform = atmelmegaavr
board = ATtiny406
framework = arduino

Use the Arduino pin numbers or proper PIN_PC0 (not PIN_C0), not these other macros. Per

so “PC0” would be Arduino pin “10”.

Ok thanks :slight_smile:

Just one question:

How can I set all pins (except PA0) on PortA at once, without delay, maybe as following?

VPORTA.OUT = VPORTA.IN | 0b11111110; //set PA1-7

Thank you

I would just follow what the Arduino core does and do

PORTA.OUTSET = 0b11111110; // set (HIGH) PA1-7

PORTA.OUTCLR = 0b11111110; // clear (LOW) PA1-7
1 Like