Arduino IDE + megaTinyCore (development) and Curiosity Nano ATtiny1607?

I'm using the development version of the megaTinyCore in Arduino IDE to generate code for the Curiosity Nano ATtiny1607.
I'm not getting compilation errors but the examples do not work.
I tried Blink (compiled in Arduino the dropped the .hex onto the virtual drive). Programming seems to work but there is no blinking.
I then took BareMinimum and added the activation of the LED_BUILTIN

void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(LED_BUILTIN, OUTPUT);
  digitalWrite(LED_BUILTIN, LOW);   // turn the LED on by setting the output LOW
}

void loop() {
  // put your main code here, to run repeatedly:
}

The user LED did not lit up.
I the tried to re-define

#ifdef LED_BUILTIN
#undef LED_BUILTIN
#define LED_BUILTIN PIN_PB7
#endif

void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(LED_BUILTIN, OUTPUT);
  digitalWrite(LED_BUILTIN, LOW);   // turn the LED on by setting the output LOW
}

void loop() {
  // put your main code here, to run repeatedly:
}

Am I doing something wrong?
Are the #DEFINE in megaTinyCore correct for Curiosity Nano ATtiny1607? Can anyone confirm that Arduino IDE + megaTinyCore (development) generated correct code for Curiosity Nano ATtiny1607?

Pressed 'Create' too soon!
With #define LED_BUILTIN PIN_PB7 the binary works and the user LED turns on.

1 Like

It seems I'm just talking to myself here :pleading_face:
I'm adding that there may be errors in boards.txt of development megaTinyCore-master in relation to the Curiosity Nano ATtiny1607:
The line
microchip.menu.board_name.cn1607.build.extra_flags=-DARDUINO_attinyxy7 -DLED_BUILTIN=PIN_PC4 -DPIN_BUTTON_BUILTIN=PIN_PB7
is wrong (this line appears twice). LED_BUILTIN is actually wired to PIN_PB7 while PIN_BUTTON_BUILTIN is wired to PIN_PC4. They have been swapped in boards.txt.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.