epikao
1
Hello,
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:
[env:ATtiny406]
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”.
epikao
3
Ok thanks ![:slight_smile: :slight_smile:](https://community.platformio.org/images/emoji/twitter/slight_smile.png?v=12)
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