Hello,
I tested the Arduino Blink example with the Attiny 13, -2313 and -24 controllersfrom Atmel. It only worked with the Attiny 13. The assigned port did not flash on the other two controllers!
The following warning message was issued on the Attiny 2313 and 24 controllers during compilation:
C:\users\xxx.platformio\packages\framework-arduino-avr-attiny\variants\
tinyX4/pins_arduino.h:156:2: warning: #warning “This is the
COUNTERCLOCKWISE pin mapping - make sure you’re using the pinout diagram
with the pins in counter clockwise order” [-Wcpp]
#warning “This is the COUNTERCLOCKWISE pin mapping - make sure you’re
using the pinout diagram with the pins in counter clockwise order”
How do I use the clockwise order?
Program code:
#include <Arduino.h>
void setup()
{
// initialize LED digital pin as an output.
pinMode(PA0, OUTPUT);
}
void loop()
{
// turn the LED on (HIGH is the voltage level)
digitalWrite(PA0, HIGH);
// wait for a second
delay(1000);
// turn the LED off by making the voltage LOW
digitalWrite(PA0, LOW);
// wait for a second
delay(1000);
}
Platformio.ini:
[env:attiny24]
platform = atmelavr
board = attiny24
framework = arduino
; change MCU frequency
;board_build.f_cpu = 1000000L
upload_protocol = custom
upload_port = COM5
upload_speed = 19200
upload_flags =
-C
; use "tool-avrdude-megaavr" for the atmelmegaavr platform
$PROJECT_PACKAGES_DIR/tool-avrdude/avrdude.conf
-p
$BOARD_MCU
-P
$UPLOAD_PORT
-b
$UPLOAD_SPEED
-c
avrispv2
upload_command = avrdude $UPLOAD_FLAGS -U flash:w:$SOURCE:i
Best regards