Hi,
I wanted to do something with microcontrollers again after few years, but I’m facing the problem which prevents me from having fun. After compiling my code, there’s no way to upload it to Atmega8. This is the message I get, when I try to upload it to Atmega:
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/atmelavr/ATmega8.html
PLATFORM: Atmel AVR 1.15.0 > ATmega8/A
HARDWARE: ATMEGA8 16MHz, 1KB RAM, 7.50KB Flash
PACKAGES:
- tool-avrdude 1.60300.190424 (6.3.0)
- toolchain-atmelavr 1.50400.190710 (5.4.0)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 0 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Checking size .pio/build/ATmega8/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [ ] 0.0% (used 0 bytes from 1024 bytes)
Flash: [ ] 0.9% (used 66 bytes from 7680 bytes)
Configuring upload protocol...
AVAILABLE: usbasp
CURRENT: upload_protocol = usbasp
Looking for upload port...
Uploading .pio/build/ATmega8/firmware.hex
avrdude: error: program enable: target doesn't answer. 1
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
avrdude done. Thank you.
*** [upload] Error 1
My platformio.ini file looks this way:
[env:ATmega8]
platform = atmelavr
board = ATmega8
upload_protocol = usbasp
upload_flags =
-Pusb
I use (as you see in .ini file) usbasp as my programmer, IDE is vscode + platformio, OS is Ubuntu 18.04. I checked connections five times, everything is fine. I have capacitors on voltage inputs.
I tested also Atmega32 and Atmega328P, same problem. I have no idea what’s wrong. I used different USB ports, same result. What other solutions should I try?