Hello, i’m trying to program my a simple blink sketch to attiny44 with platformio. When i program it, it shows success, but LED doesnt blink. It works fine with arduino IDE, so my wiring is correct.
My platformio.ini:
[env:attiny44]
platform = atmelavr
framework = arduino
upload_protocol = stk500v1
; each flag in a new line
upload_flags =
-P$UPLOAD_PORT
-b$UPLOAD_SPEED
It leaves the fuses the same however. Could you just try to go into the arduino IDE and set it to 8MHz internal, burn that program, see if it still works, and if yes, re-upload the PlatformIO program. Maybe your chip then has the right fuses.
Otherwise you’ll have to change your platformio.ini to change the frequency to 1MHz and use an extra_script to burn the fuses for 1MHz (the low-fuse is here). Custom fuses are explained here.
i uploaded the code in arduino IDE with 8mhz clock, and the LED flashing slowed down a lot.
Then, i tried to upload the pio program, but nothing happened.
I noticed when the pio program was uploading, it said
avrdude: safemode: Fuses OK (E:FF, H:DF, L:62)
you said i should burn the program with 8mhz setting. I’m not sure if you meant uploading or something else.
I tried pulsing the reset pin, doesnt seem to do anything.
I also tried to chenge the settings in arduino IDE to 8mhz and burn the bootloader.
Now it doesnt slow down the blinking when uploaded in 8mhz setting, but PIO still doesnt work.
[env:attiny44]
platform = atmelavr
framework = arduino
upload_protocol = stk500v1
; each flag in a new line
upload_flags =
-P$UPLOAD_PORT
-b$UPLOAD_SPEED
; edit these lines
upload_port = COM4
upload_speed = 19200
board = attiny44
What board support package are you using on the Arduino IDE? If you’re not using ATTinyCore, it’s possible that pin 0 on Arduino is pin 10 on PlatformIO…
It appears board_build.variant=tinyX4_reverse should trigger the ‘alternate / like older David Mellis core’ behaviour.