USBasp Error

Hey guys,

I recently bought a USBasp Programmer. I used the following driver and installed it successfully.
http://www.fischl.de/usbasp/usbasp.2011-05-28.tar.gz

Before I tried to upload code into my Arduino Mega ADK, I tried to burn the bootloader into the USBasp Programmer using the following steps:

  • Programmer:"USBasp"
  • Burn Bootloader
    But, I got an Error Message:
Arduino: 1.8.0 (Windows 10), Board: "Arduino Mega ADK"

avrdude: Warning: cannot query manufacturer for device: No such file or directory
avrdude: Warning: cannot query product for device: No such file or directory
avrdude: error: could not find USB device with vid=0x16c0 pid=0x5dc vendor='www.fischl.de' product='USBasp'
Error while burning bootloader.

What do I do now..?

I've had problems using the libusb-win32 driver that's included with that download with the AVRDUDE 6.3.0 version included with the Arduino AVR Boards included with Arduino IDE 1.6.10 and newer. I solved it by using the libusbK driver instead:

I can give exact steps for installing the libusbK driver if you need them.

pert:
I can give exact steps for installing the libusbK driver if you need them.

Yes Please..!!

  • Download Zadig: http://zadig.akeo.ie/ (you'll notice this program is actually recommended on the official USBasp webpage).
  • Plug the USBasp in to your computer
  • Start Zadig
  • Options > List all devices
  • Select USBasp from the dropdown menu
  • Click the down or up arrows on the driver menu until libusbK is selected.
  • Click "Replace Driver"
  • A Windows Security dialog will ask you to confirm you want to install the driver. Click "Install".
  • After the driver installation completes you can close Zadig.

pert:

  • Download Zadig: http://zadig.akeo.ie/ (you'll notice this program is actually recommended on the official USBasp webpage).
  • Plug the USBasp in to your computer
  • Start Zadig
  • Options > List all devices
  • Select USBasp from the dropdown menu
  • Click the down or up arrows on the driver menu until libusbK is selected.
  • Click "Replace Driver"
  • A Windows Security dialog will ask you to confirm you want to install the driver. Click "Install".
  • After the driver installation completes you can close Zadig.

Thank You for the help..! I followed the procedure and the driver got Installed Successfully..!

The driver is located at: C:\libusbK-dev-kit
The Arduino Software is located at: C:\Program Files\Arduino

I tried the USBasp with the Arduino Software. I plugged it in a USB 2.0 port, set the Programmer Option to USBasp.

I used my Mega ADK as the Target Device and tried uploading the Fade Code. The Software displayed the following error message:

Arduino: 1.8.0 (Windows 10), Board: "Arduino Mega ADK"

Sketch uses 1930 bytes (0%) of program storage space. Maximum is 253952 bytes.
Global variables use 13 bytes (0%) of dynamic memory, leaving 8179 bytes for local variables. Maximum is 8192 bytes.

avrdude: ser_open(): can't open device "\\.\COM3": The system cannot find the file specified.


avrdude: ser_drain(): read error: The handle is invalid.


avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: ser_recv(): read error: The handle is invalid.


avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: ser_recv(): read error: The handle is invalid.


avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: ser_recv(): read error: The handle is invalid.


avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: ser_recv(): read error: The handle is invalid.


avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: ser_recv(): read error: The handle is invalid.


avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: ser_recv(): read error: The handle is invalid.


avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
the selected serial port avrdude: stk500v2_getsync(): timeout communicating with programmer
 does not exist or your board is not connected

Later, I found out that the USBasp was not at all discovered by the Arduino IDE...
The port option in the tools section was inactive...

What do I do now..??

The USBasp doesn't show up as a port, it's a pure USB device. You need to do Sketch > Upload Using Programmer.

pert:
The USBasp doesn't show up as a port, it's a pure USB device. You need to do Sketch > Upload Using Programmer.

I tried even that. I set the Programmer to USBasp and Board to Arduino Mega ADK.

I think in the Process of getting my USBasp work, I fried my Mega ADK :confused:

I am not even able to upload Code using the USB Port... :sob:

Please do this:

  • Tools > Preferences > Show verbose output during: > compilation (uncheck) > upload (check) > OK
  • Sketch > Upload Using Programmer
  • After the process fails you'll see a button on the right side of the orange bar "Copy error messages". Click that button.
  • Paste the error messages in a reply here using code tags.

SagarDev:
I am not even able to upload Code using the USB Port... :sob:

When you do an Upload Using Programmer the bootloader is erased and you need to do a Burn Bootloader before you can upload using USB again.

I re-installed the Arduino Mega ADK Drivers and tried burning the bootloader as you suggested. But all I got was an Error Message saying:
Error while burning Bootloader

I tried uploading the fade sketch and I got this error message:

Arduino: 1.8.0 (Windows 10), Board: "Arduino Mega ADK"

Sketch uses 1930 bytes (0%) of program storage space. Maximum is 253952 bytes.
Global variables use 13 bytes (0%) of dynamic memory, leaving 8179 bytes for local variables. Maximum is 8192 bytes.

avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
An error occurred while uploading the sketch

I am not even able to reset the Arduino by pressing the Reset button. :confused:

I later turned on the Verbose Output and tried burning the bootloader. I got:

Arduino: 1.8.0 (Windows 10), Board: "Arduino Mega ADK"

C:\Users\devan\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9/bin/avrdude -CC:\Users\devan\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9/etc/avrdude.conf -v -patmega2560 -cstk500v2 -Pusb -e -Ulock:w:0x3F:m -Uefuse:w:0xFD:m -Uhfuse:w:0xD8:m -Ulfuse:w:0xFF:m 

avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Users\devan\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9/etc/avrdude.conf"

         Using Port                    : usb
         Using Programmer              : stk500v2
avrdude: usbdev_open(): did not find any USB device "usb" (0x03eb:0x2104)

avrdude done.  Thank you.

Error while burning bootloader.

I also tried uploading the code. I got:

Arduino: 1.8.0 (Windows 10), Board: "Arduino Mega ADK"

Sketch uses 1930 bytes (0%) of program storage space. Maximum is 253952 bytes.
Global variables use 13 bytes (0%) of dynamic memory, leaving 8179 bytes for local variables. Maximum is 8192 bytes.

C:\Users\devan\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9/bin/avrdude -CC:\Users\devan\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9/etc/avrdude.conf -v -patmega2560 -cwiring -PCOM3 -b115200 -D -Uflash:w:C:\Users\devan\AppData\Local\Temp\arduino_build_943989/Fade.ino.hex:i 

avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Users\devan\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9/etc/avrdude.conf"

         Using Port                    : COM3
         Using Programmer              : wiring
         Overriding Baud Rate          : 115200
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer

avrdude done.  Thank you.

An error occurred while uploading the sketch

Alas, I guess I have roasted my Arduino Mega ADK..! :sob:

What do I do now..??

avrdude params don't look right for the burning bootloader... suspect you're in a similar place for ISP uploads.

-cstk500v2 should be -cusbasp

How you've managed to make your copy of the IDE do this is unclear to me.

DrAzzy:
avrdude params don't look right for the burning bootloader... suspect you're in a similar place for ISP uploads.

-cstk500v2 should be -cusbasp

How you've managed to make your copy of the IDE do this is unclear to me.

My Mega ADK is not at all working after trying the USBasp on it...

I am not even able to program it through the on-board 16U2...

Even the reset button is not working...

What is happening..?