AVRDUDE does not recognize USBasp device

Electrical Engineering Asked by bas on December 5, 2020

I’m am having issues with my USBasp programmer (Windows 10). I installed the WinUSB driver using zadig 2.4.

When I run AVR dude with the following parameters

avrdude -c USBasp -p m32u4 -u -U flash:w:justahex.ino.hex:i

It immediately returns with this error:

avrdude: error: could not find USB device with vid=0x16c0 pid=0x5dc vendor='' product='USBasp'

It looks for a USB device with vendor ID “0x16c0” and product ID “0x5dc”. This is the correct set of IDs according to Zadig:

enter image description here

Also the device manager seems to find the device without issues:

USB asp correctly installed

Again with correct vendor/product ID

When I google the topic I see a lot of forums where people have issues getting their USBasp device working under windows 10. But they mostly are having issues with the libusb /WinUSB drivers (Which seems to be fine in my case thanks to the Zadig tool).

So I find myself stuck in getting further. Are there any other things I can check? Or is the device broken somehow (which would surprise me as it does get installed properly in windows)

3 Answers

I'm a bit late to the game, but I just experienced the same error (albeit with different causes).

  • on most places on the internet you will be instructed to install the libusbK driver, which doesn't work, use the libusb-win32 variant instead
  • make sure the AVRDUDE.EXE tool is the latest version (the older doesn't work with the newer USB drivers for some reason)
  • in case of using a clone (for instance having "Van Ooijen's technische informatica" as vendor id instead of the original name ""), make sure to use the -c usbasp-clone -P usb AVRDUDE settings instead of -c usbap -P usb. The clone setting causes AVRDUDE to ignore the vendor description and also accept the clone. You'd think having the correct VID, PID combination would be sufficient but no...

Bonus: for the extra lazy ones, here's an example command line that would flash that Arduino Leonardo board from Atmel studio (warning, this will overwrite the bootloader):

avrdude.exe -C"avrdude.conf" -p atmega32u4 -c usbasp-clone -P usb -U flash:w:"$(ProjectDir)Debug$(TargetName).hex":i

Correct answer by E. van Putten on December 5, 2020

For avrdude to correctly work with USBAsp, I found the best to install the libusbK driver, at least under Windows 7. This way it works with both - the official avrdude build, and the one from the Arduino IDE. With the libusb-win32 or the WinUSB it works with one, but fails with another.

Answered by TzOk on December 5, 2020

Found the solution, which is of course dead simple once you know...

In Zadig, you can select the driver. Default selected is (in my case) the WinUSB driver. When I select the libusb driver, and install that driver, it works like a charm.


enter image description here

avrdude -vvv -c USBasp -p m32u4 -u -U flash:w:Duroduino.ino.hex:i

avrdude: Version 6.3, compiled on Feb 17 2016 at 09:25:53
         Copyright (c) 2000-2005 Brian Dean,
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "c:_SVNp(r)insDurocanDeploymentavrdude.conf"

         Using Port                    : usb
         Using Programmer              : USBasp
avrdude: usbasp_open("usb")
avrdude: seen device from vendor -><-
avrdude: seen product ->USBasp<-
         AVR Part                      : ATmega32U4
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PA0
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

Answered by bas on December 5, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP