UNO stopped working after having worked for years

Windows 10, generic UNO, Arduino IDE 2.3.7

I have used this board for years. Successfully used at as ISP just last night to upload code to an ATtiny84. Tried to upload the code again this morning to the same ATtiny and it gave me the following error:

FQBN: arduino:avr:uno
Using board 'uno' from platform in folder: C:\Users\owner\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.7
Using core 'arduino' from platform in folder: C:\Users\owner\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.7

Detecting libraries used...
C:\Users\owner\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Users\owner\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.7\cores\arduino -IC:\Users\owner\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.7\variants\standard C:\Users\owner\AppData\Local\arduino\sketches\7263D99E3C4843F4006191072788A1B4\sketch\ArduinoISP.ino.cpp -o nul
Alternatives for SPI.h: [SPI@1.0]
ResolveLibrary(SPI.h)
  -> candidates: [SPI@1.0]
C:\Users\owner\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Users\owner\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.7\cores\arduino -IC:\Users\owner\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.7\variants\standard -IC:\Users\owner\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.7\libraries\SPI\src C:\Users\owner\AppData\Local\arduino\sketches\7263D99E3C4843F4006191072788A1B4\sketch\ArduinoISP.ino.cpp -o nul
C:\Users\owner\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Users\owner\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.7\cores\arduino -IC:\Users\owner\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.7\variants\standard -IC:\Users\owner\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.7\libraries\SPI\src C:\Users\owner\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.7\libraries\SPI\src\SPI.cpp -o nul
Generating function prototypes...
C:\Users\owner\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Users\owner\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.7\cores\arduino -IC:\Users\owner\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.7\variants\standard -IC:\Users\owner\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.7\libraries\SPI\src C:\Users\owner\AppData\Local\arduino\sketches\7263D99E3C4843F4006191072788A1B4\sketch\ArduinoISP.ino.cpp -o C:\Users\owner\AppData\Local\Temp\896806571\sketch_merged.cpp
C:\Users\owner\AppData\Local\Arduino15\packages\builtin\tools\ctags\5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives C:\Users\owner\AppData\Local\Temp\896806571\sketch_merged.cpp

Compiling sketch...
"C:\\Users\\owner\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\owner\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.7\\cores\\arduino" "-IC:\\Users\\owner\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.7\\variants\\standard" "-IC:\\Users\\owner\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.7\\libraries\\SPI\\src" "C:\\Users\\owner\\AppData\\Local\\arduino\\sketches\\7263D99E3C4843F4006191072788A1B4\\sketch\\ArduinoISP.ino.cpp" -o "C:\\Users\\owner\\AppData\\Local\\arduino\\sketches\\7263D99E3C4843F4006191072788A1B4\\sketch\\ArduinoISP.ino.cpp.o"
Compiling libraries...
Compiling library "SPI"
"C:\\Users\\owner\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\owner\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.7\\cores\\arduino" "-IC:\\Users\\owner\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.7\\variants\\standard" "-IC:\\Users\\owner\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.7\\libraries\\SPI\\src" "C:\\Users\\owner\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.7\\libraries\\SPI\\src\\SPI.cpp" -o "C:\\Users\\owner\\AppData\\Local\\arduino\\sketches\\7263D99E3C4843F4006191072788A1B4\\libraries\\SPI\\SPI.cpp.o"
Compiling core...
Using precompiled core: C:\Users\owner\AppData\Local\arduino\cores\arduino_avr_uno_1f8e581a1cb3d6d60f3bd83bc1c26c8e\core.a
Linking everything together...
"C:\\Users\\owner\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o "C:\\Users\\owner\\AppData\\Local\\arduino\\sketches\\7263D99E3C4843F4006191072788A1B4/ArduinoISP.ino.elf" "C:\\Users\\owner\\AppData\\Local\\arduino\\sketches\\7263D99E3C4843F4006191072788A1B4\\sketch\\ArduinoISP.ino.cpp.o" "C:\\Users\\owner\\AppData\\Local\\arduino\\sketches\\7263D99E3C4843F4006191072788A1B4\\libraries\\SPI\\SPI.cpp.o" "C:\\Users\\owner\\AppData\\Local\\arduino\\sketches\\7263D99E3C4843F4006191072788A1B4/..\\..\\cores\\arduino_avr_uno_1f8e581a1cb3d6d60f3bd83bc1c26c8e\\core.a" "-LC:\\Users\\owner\\AppData\\Local\\arduino\\sketches\\7263D99E3C4843F4006191072788A1B4" -lm
"C:\\Users\\owner\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "C:\\Users\\owner\\AppData\\Local\\arduino\\sketches\\7263D99E3C4843F4006191072788A1B4/ArduinoISP.ino.elf" "C:\\Users\\owner\\AppData\\Local\\arduino\\sketches\\7263D99E3C4843F4006191072788A1B4/ArduinoISP.ino.eep"
"C:\\Users\\owner\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy" -O ihex -R .eeprom "C:\\Users\\owner\\AppData\\Local\\arduino\\sketches\\7263D99E3C4843F4006191072788A1B4/ArduinoISP.ino.elf" "C:\\Users\\owner\\AppData\\Local\\arduino\\sketches\\7263D99E3C4843F4006191072788A1B4/ArduinoISP.ino.hex"
Using library SPI at version 1.0 in folder: C:\Users\owner\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.7\libraries\SPI 
"C:\\Users\\owner\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-size" -A "C:\\Users\\owner\\AppData\\Local\\arduino\\sketches\\7263D99E3C4843F4006191072788A1B4/ArduinoISP.ino.elf"
Sketch uses 4354 bytes (13%) of program storage space. Maximum is 32256 bytes.
Global variables use 482 bytes (23%) of dynamic memory, leaving 1566 bytes for local variables. Maximum is 2048 bytes.
"C:\Users\owner\AppData\Local\Arduino15\packages\arduino\tools\avrdude\8.0.0-arduino1/bin/avrdude" "-CC:\Users\owner\AppData\Local\Arduino15\packages\arduino\tools\avrdude\8.0.0-arduino1/etc/avrdude.conf" -v  -patmega328p -carduino "-PCOM4" -b115200 -D "-Uflash:w:C:\Users\owner\AppData\Local\arduino\sketches\7263D99E3C4843F4006191072788A1B4/ArduinoISP.ino.hex:i"
Avrdude version 8.0-arduino.1
Copyright see https://github.com/avrdudes/avrdude/blob/main/AUTHORS

System wide configuration file is C:\Users\owner\AppData\Local\Arduino15\packages\arduino\tools\avrdude\8.0.0-arduino1\etc\avrdude.conf

Using port            : COM4
Using programmer      : arduino
Setting baud rate     : 115200
Error: cannot set com-state for \\.\COM4
Error: unable to open port COM4 for programmer arduino

Avrdude done.  Thank you.
Failed uploading: uploading error: exit status 1

I have tried a different USB cable, I was not able to use a MEGA to burn a bootloader (UNO is showing solid LED L), I have double checked the COM ports, I have reinstalled Arduino, I have reinstalled CH340 drivers, I have tried to upload the blink sketch. I have used AVRISP mkll as the programmer, I have used Arduino as ISP as the programmer. I have restarted my computer. I have tried uploading a sketch to a different ATTiny.

I have no idea why its not communicating with my board.

Thanks for the help in advance.

Ryan

1 Like

Error still occurring after following the instructions.

FQBN: arduino:avr:uno
Using board 'uno' from platform in folder: C:\Users\owner\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.7
Using core 'arduino' from platform in folder: C:\Users\owner\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.7

Detecting libraries used...
C:\Users\owner\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Users\owner\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.7\cores\arduino -IC:\Users\owner\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.7\variants\standard C:\Users\owner\AppData\Local\arduino\sketches\CF15F9D9AAAE663B11695909AE3418C2\sketch\Blink.ino.cpp -o nul
Generating function prototypes...
C:\Users\owner\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Users\owner\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.7\cores\arduino -IC:\Users\owner\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.7\variants\standard C:\Users\owner\AppData\Local\arduino\sketches\CF15F9D9AAAE663B11695909AE3418C2\sketch\Blink.ino.cpp -o C:\Users\owner\AppData\Local\Temp\1000354483\sketch_merged.cpp
C:\Users\owner\AppData\Local\Arduino15\packages\builtin\tools\ctags\5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives C:\Users\owner\AppData\Local\Temp\1000354483\sketch_merged.cpp

Compiling sketch...
"C:\\Users\\owner\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\owner\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.7\\cores\\arduino" "-IC:\\Users\\owner\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.7\\variants\\standard" "C:\\Users\\owner\\AppData\\Local\\arduino\\sketches\\CF15F9D9AAAE663B11695909AE3418C2\\sketch\\Blink.ino.cpp" -o "C:\\Users\\owner\\AppData\\Local\\arduino\\sketches\\CF15F9D9AAAE663B11695909AE3418C2\\sketch\\Blink.ino.cpp.o"
Compiling libraries...
Compiling core...
Using precompiled core: C:\Users\owner\AppData\Local\arduino\cores\arduino_avr_uno_1f8e581a1cb3d6d60f3bd83bc1c26c8e\core.a
Linking everything together...
"C:\\Users\\owner\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o "C:\\Users\\owner\\AppData\\Local\\arduino\\sketches\\CF15F9D9AAAE663B11695909AE3418C2/Blink.ino.elf" "C:\\Users\\owner\\AppData\\Local\\arduino\\sketches\\CF15F9D9AAAE663B11695909AE3418C2\\sketch\\Blink.ino.cpp.o" "C:\\Users\\owner\\AppData\\Local\\arduino\\sketches\\CF15F9D9AAAE663B11695909AE3418C2/..\\..\\cores\\arduino_avr_uno_1f8e581a1cb3d6d60f3bd83bc1c26c8e\\core.a" "-LC:\\Users\\owner\\AppData\\Local\\arduino\\sketches\\CF15F9D9AAAE663B11695909AE3418C2" -lm
"C:\\Users\\owner\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "C:\\Users\\owner\\AppData\\Local\\arduino\\sketches\\CF15F9D9AAAE663B11695909AE3418C2/Blink.ino.elf" "C:\\Users\\owner\\AppData\\Local\\arduino\\sketches\\CF15F9D9AAAE663B11695909AE3418C2/Blink.ino.eep"
"C:\\Users\\owner\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy" -O ihex -R .eeprom "C:\\Users\\owner\\AppData\\Local\\arduino\\sketches\\CF15F9D9AAAE663B11695909AE3418C2/Blink.ino.elf" "C:\\Users\\owner\\AppData\\Local\\arduino\\sketches\\CF15F9D9AAAE663B11695909AE3418C2/Blink.ino.hex"
"C:\\Users\\owner\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-size" -A "C:\\Users\\owner\\AppData\\Local\\arduino\\sketches\\CF15F9D9AAAE663B11695909AE3418C2/Blink.ino.elf"
Sketch uses 924 bytes (2%) of program storage space. Maximum is 32256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.
"C:\Users\owner\AppData\Local\Arduino15\packages\arduino\tools\avrdude\8.0.0-arduino1/bin/avrdude" "-CC:\Users\owner\AppData\Local\Arduino15\packages\arduino\tools\avrdude\8.0.0-arduino1/etc/avrdude.conf" -v  -patmega328p -carduino "-PCOM4" -b115200 -D "-Uflash:w:C:\Users\owner\AppData\Local\arduino\sketches\CF15F9D9AAAE663B11695909AE3418C2/Blink.ino.hex:i"
Avrdude version 8.0-arduino.1
Copyright see https://github.com/avrdudes/avrdude/blob/main/AUTHORS

System wide configuration file is C:\Users\owner\AppData\Local\Arduino15\packages\arduino\tools\avrdude\8.0.0-arduino1\etc\avrdude.conf

Using port            : COM4
Using programmer      : arduino
Setting baud rate     : 115200
Error: cannot set com-state for \\.\COM4
Error: unable to open port COM4 for programmer arduino

Avrdude done.  Thank you.
Failed uploading: uploading error: exit status 1

I didn't come up with the solution, I just passed it on. From everything I've read, it works as stated.

Thank you for sharing that. I wonder if my UNO is bricked.

Just upgraded to IDE 2.3.7

This is the error I get when I try to upload a .hex in AVRDUDESS

Device signature = FF FF FF (retrying)
Device signature = FF FF FF (retrying)
Device signature = FF FF FF
Error: invalid device signature
Error: expected signature for ATmega328P is 1E 95 0F
  - double check connections and try again, or use -F to carry on regardless

Avrdude done.  Thank you.

was able to burn bootloader, but cannot upload blink sketch. getting same error as the first post.

"C:\Users\owner\AppData\Local\Arduino15\packages\arduino\tools\avrdude\8.0.0-arduino1/bin/avrdude" "-CC:\Users\owner\AppData\Local\Arduino15\packages\arduino\tools\avrdude\8.0.0-arduino1/etc/avrdude.conf" -v -patmega328p -cstk500v1 -PCOM4 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0xFD:m -Uhfuse:w:0xDE:m -Ulfuse:w:0xFF:m
Avrdude version 8.0-arduino.1
Copyright see https://github.com/avrdudes/avrdude/blob/main/AUTHORS

System wide configuration file is C:\Users\owner\AppData\Local\Arduino15\packages\arduino\tools\avrdude\8.0.0-arduino1\etc\avrdude.conf

Using port            : COM4
Using programmer      : stk500v1
Setting baud rate     : 19200
AVR part              : ATmega328P
Programming modes     : SPM, ISP, HVPP, debugWIRE
Programmer type       : STK500
Description           : Atmel STK500 v1
HW Version            : 2
FW Version            : 1.18
Topcard               : Unknown
Vtarget               : 0.0 V
Varef                 : 0.0 V
Oscillator            : Off
SCK period            : 0.0 us
XTAL frequency        : 7.372800 MHz

AVR device initialized and ready to accept instructions
Device signature = 1E 95 0F (ATmega328P, ATA6614Q, LGT8F328P)
Erased chip

Processing -U lock:w:0x3F:m
Reading 1 byte for lock from input file 0x3F
in 1 section [0, 0]
Writing 1 byte (0x3F) to lock, 1 byte written, 1 verified

Processing -U efuse:w:0xFD:m
Reading 1 byte for efuse from input file 0xFD
in 1 section [0, 0]
Writing 1 byte (0xFD) to efuse"C:\Users\owner\AppData\Local\Arduino15\packages\arduino\tools\avrdude\8.0.0-arduino1/bin/avrdude" "-CC:\Users\owner\AppData\Local\Arduino15\packages\arduino\tools\avrdude\8.0.0-arduino1/etc/avrdude.conf" -v -patmega328p -cstk500v1 -PCOM4 -b19200 "-Uflash:w:C:\Users\owner\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.7/bootloaders/optiboot/optiboot_atmega328.hex:i" -Ulock:w:0x0F:m
, 1 byte written, 1 verified

Processing -U hfuse:w:0xDE:m
Reading 1 byte for hfuse from input file 0xDE
in 1 section [0, 0]
Writing 1 byte (0xDE) to hfuse, 1 byte written, 1 verified

Processing -U lfuse:w:0xFF:m
Reading 1 byte for lfuse from input file 0xFF
in 1 section [0, 0]
Writing 1 byte (0xFF) to lfuse, 1 byte written, 1 verified

Avrdude done.  Thank you.
Avrdude version 8.0-arduino.1
Copyright see https://github.com/avrdudes/avrdude/blob/main/AUTHORS

System wide configuration file is C:\Users\owner\AppData\Local\Arduino15\packages\arduino\tools\avrdude\8.0.0-arduino1\etc\avrdude.conf

Using port            : COM4
Using programmer      : stk500v1
Setting baud rate     : 19200
AVR part              : ATmega328P
Programming modes     : SPM, ISP, HVPP, debugWIRE
Programmer type       : STK500
Description           : Atmel STK500 v1
HW Version            : 2
FW Version            : 1.18
Topcard               : Unknown
Vtarget               : 0.0 V
Varef                 : 0.0 V
Oscillator            : Off
SCK period            : 0.0 us
XTAL frequency        : 7.372800 MHz

AVR device initialized and ready to accept instructions
Device signature = 1E 95 0F (ATmega328P, ATA6614Q, LGT8F328P)
Auto-erasing chip as flash memory needs programming (-U flash:w:...)
specify the -D option to disable this feature
Erased chip

Processing -U flash:w:C:\Users\owner\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.7/bootloaders/optiboot/optiboot_atmega328.hex:i
Reading 502 bytes for flash from input file optiboot_atmega328.hex
in 2 sections of [0x7e00, 0x7fff]: 4 pages and 10 pad bytes
Writing 502 bytes to flash
Writing | ################################################## | 100% 0.63s
Reading | ################################################## | 100% 0.31s
502 bytes of flash verified

Processing -U lock:w:0x0F:m
Reading 1 byte for lock from input file 0x0F
in 1 section [0, 0]
Writing 1 byte (0x0F) to lock, 1 byte written, 1 verified

Avrdude done.  Thank you.

So now I was able to upload the sketch to the UNO using the Upload Using Programmer (crtl = shift + U).

I can upload ArduinoISP to my UNO using the MEGA and upload using programmer but I cannot then use that UNO as a programmer.

I can upload all the sketches to the UNO this way.

The board is fine, just can't figure out why the UNO isn't communicating to my computer.

When I try and use the UNO as a programmer to my ATtiny84, it says the device is drawing too much power. The ATtiny84 is a QFN package, maybe I have a short. I hand soldered it with lots of flux, the chip is aligned properly and the SCK, MOSI, MISO, SS pins are all correct.

Use your multimeter to check continuity and resistance values.

Have you restarted windows?

Same error.

Hi @analogtek.

You have Arduino IDE configured to upload to the UNO board, not for the ATtiny85. You must configure Arduino IDE's Tools > Board menu as is appropriate for the target. In this case, the target is the ATtiny85. The UNO is only acting as a programmer that writes the upload data from the computer to the flash memory of the ATtiny85. The fact that the programmer happens to be an UNO is not relevant to the configuration of the Tools > Board menu.

Correct the Tools > Board menu selection and then try again.

I understand that.

I am trying to just upload any sketch the generic UNO at this point. (Generic UNO has no markings on the CH340 chip, I know this has been a problem for other users but as of yesterday everything worked fine.)

I rolled back the drivers from version 3.9 to 3.4 and now I get this:

Warning: attempt 1 of 10: not in sync: resp=0x00

I can upload a sketch to the UNO if I use my MEGA as Arduino as ISP and then upload using programmer but I cannot directly upload to the UNO, so I know the UNO is working as uploading a blink sketch works fine.

Thanks for your help!

Great news! This means you have solved the cause of the "cannot set com-state"

When you did that, you erased the bootloader from the flash memory of the UNO's ATmega328P microcontroller. The bootloader is required in order to upload sketches to the UNO via a direct USB cable connection to your computer. For this reason, If you perform an "Upload Using Programmer" at some point and then later decide you want to go back to normal uploading to the boards, you must first perform a "Burn Bootloader" operation in order to be able to do so.

The new error you got is normal and expected when you attempt to do a normal upload to an UNO that doesn't have a bootloader.

So try this:

  1. Connect the Mega board to the UNO board in the "Arduino as ISP" configuration.
  2. Select Tools > Burn Bootloader from the Arduino IDE menus.
  3. Wait for the "Burn Bootloader" operation to finish successfully.
  4. Disconnect the Mega from the UNO board.
  5. Connect the UNO board to your computer with a USB cable.
  6. Select Sketch > Upload from the Arduino IDE menus.

The upload should now finish successfully.

2 Likes

I also installed the UNO bootloader and still I get an error. Let me quickly try again and get back to you.

bootloader installed.

AVR device initialized and ready to accept instructions
Device signature = 1E 95 0F (ATmega328P, ATA6614Q, LGT8F328P)
Auto-erasing chip as flash memory needs programming (-U flash:w:...)
specify the -D option to disable this feature
Erased chip

Processing -U flash:w:C:\Users\owner\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.7/bootloaders/optiboot/optiboot_atmega328.hex:i
Reading 502 bytes for flash from input file optiboot_atmega328.hex
in 2 sections of [0x7e00, 0x7fff]: 4 pages and 10 pad bytes
Writing 502 bytes to flash
Writing | ################################################## | 100% 0.63s
Reading | ################################################## | 100% 0.30s
502 bytes of flash verified

Processing -U lock:w:0x0F:m
Reading 1 byte for lock from input file 0x0F
in 1 section [0, 0]
Writing 1 byte (0x0F) to lock, 1 byte written, 1 verified

Avrdude done.  Thank you.

Blink sketch upload error

Using port            : COM4
Using programmer      : arduino
Setting baud rate     : 115200
Error: cannot set com-state for \\.\COM4
Error: unable to open port COM4 for programmer arduino

Avrdude done.  Thank you.
Failed uploading: uploading error: exit status 1

COM4 confirmed in device manager.
Board set to UNO
Programmer set to AVRISP mkll

My MEGA is also generic but has the CH340 branded chip on it.

It's got to be something with the drivers.

Here is what I get when I try and use AVRDUDESS to upload a .hex file to the UNO.

>>>: avrdude.exe 
Loaded 184 programmers and 373 MCUs
LUMENOISE FINAL VERSION.hex: 3,726 / 32,768 Bytes (11.37%)
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
>>>: avrdude.exe -c arduino_as_isp -p m328p -P COM4 -e -U flash:w:"C:\Users\owner\Documents\projects\lumenoise\LUMENOISE FINAL VERSION.hex":a 
Error: cannot set com-state for \\.\COM4
Error: unable to open port COM4 for programmer arduino_as_isp

Avrdude done.  Thank you.

I can use the MEGA to upload .hex onto the UNO using AVRDUDESS.

I'll just use the mega as the programmer for now, but this is really annoying.

same error when I switch to COM5. change baud rate to 9600, same. have programmer in AVRDUDESS set to Arduino bootloader using STK500 v 1 protocol.

Using port            : COM5
Using programmer      : arduino
Setting baud rate     : 115200
Error: cannot set com-state for \\.\COM5
Error: unable to open port COM5 for programmer arduino

Avrdude done.  Thank you.
Failed uploading: uploading error: exit status 1

I'm going to ask you to provide some additional information that might help us to understand how to proceed.


:red_exclamation_mark: This procedure is not intended to solve the problem. The purpose is to gather more information.


Please do this:

  1. Directly connect the UNO board to your computer with a USB cable.
  2. Disconnect all other Arduino boards from your computer.
    :red_exclamation_mark: This includes the Mega. Make sure the Mega is not connected to your computer.
  3. Open the Windows Device Manager.
  4. Select View > Devices by type from the Device Manager menus.
  5. Open the "View" menu.
  6. If there is a βœ“ to the left of the "Show hidden devices" menu item, click on "Show hidden devices" to disable it.
  7. Open the "Ports (COM & LPT)" section of the Device Manager tree.
  8. You should see a port identified as "USB-SERIAL CH340 (COMn)" under the "Ports (COM & LPT)" section (where "COMn" is some serial port e.g., COM4). Double click on that item.
    The "USB-SERIAL CH340 (COMn) Properties" dialog will open.
  9. Select the "Drivers" tab of the "USB-SERIAL CH340 (COMn) Properties" dialog.

Now please reply here on this forum topic to tell us the version number you saw after "Driver Version" field in that "USB-SERIAL CH340 (COMn) Properties" dialog.