upload firmware in usbasp

i have two usbasp device, they have stopped working. I use AVRDUDES to upload code on atmega avrs.
owing to some error in one to one connections on a icsp header these have stopped uploading and the error is

avrdude.exe done.  Thank you.


WARNING: Unable to detect MCU

avrdude.exe: error: could not find USB device with vid=0x16c0 pid=0x5dc vendor='www.fischl.de' product='USBasp'


avrdude.exe done.  Thank you.

i put one of them on self prog mode and uploaded the Arduinoisp sketch to my arduino uno.
the upload is successful
I then hook up connections as
USBASP Arduino
2 5V
10 GND
7 13
9(MISO) 12
1(MOSI) 11
5(RESET) 10

In the command prompt window
this command is entered
D:\Arduino_1.8.9\arduino-1.8.9\hardware\tools\avr\bin> avrdude -C..\etc\avrdude.conf -c avrisp -P COM7 -b 19200 -p m8 -V

and the out put is

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.04s

avrdude: Device signature = 0x1e9307 (probably m8)

avrdude: safemode: Sorry, reading back fuses was unreliable. I have given up and exited programming mode

avrdude done.  Thank you.]

I have not been able to understand why this error is generated, AVR not happy.
Seek inputs from senior members please.

I bought a new USBASP and the response is the same. Leads me to think that the problem is elsewhere, perhaps the drivers need to be reinstalled. Will update after having reinstalled the drivers.

Drivers were upto date.
When the following averdude command was executed the output is as below

D:\Arduino_1.8.9\arduino-1.8.9\hardware\tools\avr\bin> avrdude -C..\etc\avrdude.conf -c usbasp -P usb -p m8 -u -v -e -U flash:w:usbasp.atmega8.2011-05-28.hex

avrdude: Version 6.3-20171130
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "..\etc\avrdude.conf"

         Using Port                    : usb
         Using Programmer              : usbasp
         AVR Part                      : ATmega8
         Chip Erase delay              : 10000 us
         PAGEL                         : PD7
         BS2                           : PC2
         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                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom         4    20   128    0 no        512    4      0  9000  9000 0xff 0xff
           flash         33    10    64    0 yes      8192   64    128  4500  4500 0xff 0x00
           lfuse          0     0     0    0 no          1    0      0  2000  2000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  2000  2000 0x00 0x00
           efuse          0     0     0    0 no          0    0      0     0     0 0x00 0x00
           lock           0     0     0    0 no          1    0      0  2000  2000 0x00 0x00
           calibration    0     0     0    0 no          4    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : usbasp
         Description     : USBasp, http://www.fischl.de/usbasp/

avrdude: auto set sck period (because given equals null)
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.03s

avrdude: Device signature = 0x1e9307 (probably m8)
avrdude: erasing chip
avrdude: auto set sck period (because given equals null)
avrdude: reading input file "usbasp.atmega8.2011-05-28.hex"
avrdude: input file usbasp.atmega8.2011-05-28.hex auto detected as Intel Hex
avrdude: writing flash (4700 bytes):

Writing | ################################################## | 100% 1.74s

avrdude: 4700 bytes of flash written
avrdude: verifying flash memory against usbasp.atmega8.2011-05-28.hex:
avrdude: load data flash data from input file usbasp.atmega8.2011-05-28.hex:
avrdude: input file usbasp.atmega8.2011-05-28.hex auto detected as Intel Hex
avrdude: input file usbasp.atmega8.2011-05-28.hex contains 4700 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 1.57s

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
         0x00 != 0x3b
avrdude: verification error; content mismatch

avrdude done.  Thank you.


D:\Arduino_1.8.9\arduino-1.8.9\hardware\tools\avr\bin>

My mind has been numbed by this vexing issue the entire day.
Help in resolution of this despairing condition will be wonderful.
Regards for your time.

I think you want pin 10 of the Arduino to be connected to the USBAsp reset pin - not the pin of the USBAsp that gets connected to the target. Is that what you have connected to it?

DrAzzy:
I think you want pin 10 of the Arduino to be connected to the USBAsp reset pin - not the pin of the USBAsp that gets connected to the target. Is that what you have connected to it?

Thanks for your question DrAzzy.
That was the case in my first post where i thought i need to reload the firmware on my usbasp.
but in my post #2 i am using avrdude to write the hex file onto a an atmega8(target) connected to the usbasp with a FRC cable with 10 pin connectors at both ends.
As per the response of the averdude command the write is successful but there is a read error.

Adafruit has been saying that the VUSB based devices are getting less likely to work with modern computers and operating systems...

westfw:
Adafruit has been saying that the VUSB based devices are getting less likely to work with modern computers and operating systems...

what do you suggest westfw, to program AVR in standalone mode using ICSP?

I am relieved folks.
I got both my USBASPs working.
Re installed the drivers by the Zadig app here http://zadig.akeo.ie/

I'm glad to hear that you got your USBASPs working! Did you install the libusbK driver?

pert:
Did you install the libusbK driver?

Yes pert I installed this driver.

Thanks for the info. It's may be helpful to others who are having the same issue and find this thread in their search for a solution. I also have found that changing from the libusb-win32 driver to the libusbK driver fixes the problem with the USBasp:

I also have found that changing from the libusb-win32 driver to the libusbK driver fixes the problem with the USBasp.
[\quote]
It is funny but now my Arduino clone is also recognised as a libusbK device and the port under tools is greyed.
How do I get the ports back in the Arduino IDE?

You must have accidentally installed the libusbK driver to your Arduino. To fix this:

  • Plug your Arduino board into your computer.
  • Start Windows Device Manager
  • Expand the "libusbK USB devices" section of the Device Manager tree.
  • Right click on the Arduino board under the "libusbK USB devices" section.
  • Click "Uninstall Device".
  • Click the "Uninstall" button.
  • Wait for the uninstall to finish.
  • Unplug your Arduino board from your computer.
  • Wait for Device Manager to update.
  • Plug your Arduino board into your computer. You should now see the board under the "Ports (COM and LPT)" section of the Device Manager tree with an assigned COM port as normal.

Hi pert,
I did as you suggested. the device comes back as an Atmel USB devices and under this it shows as "Richduino Boards for Arduino (Interface 0)"

If you suggest should I start a new thread or is it okay to coninue?

Best Regards.

pert:
I also have found that changing from the libusb-win32 driver to the libusbK driver fixes the problem with the USBasp:
avrdude 6.3.0-arduino2 incompatible with USBasp using libusb-win32 driver · Issue #1 · arduino/avrdude-build-script · GitHub

I read your reply to bperrybap on Aug 3,2016

per1234 commented on Aug 3, 2016
@bperrybap thanks for looking into this. I'm not sure when I'll have time to look into building avrdude from source, etc. I know that's lame but the issues caused by the last Arduino release have been eating up all the time I can contribute to Arduino and much more. I'm obligated to put priority on getting all the 3rd party boards projects I'm involved with fixed ASAP.

I hope the information I provided and the work you've done will help others. I'm happy to provide any more information requested.

If anyone reading this has Windows and a USBasp it would be great if you could see if you can reproduce this issue to make sure it isn't something specific to my computers:

Download Zadig from http://zadig.akeo.ie/
Plug the USBasp into your computer
Start Zadig
Options > List all devices
Select USBasp from the dropdown menu
Select libusb-win32 (v1.2.6.0)
Click Install
Start Arduino IDE
Install Arduino AVR Boards 1.6.12 in Tools > Boards > Boards Manager if you're using a previous version
Unplug USBasp
Connect the USBasp to your Arduino
Plug the USBasp into your computer
Tools > Board > select your Arduino
Tools > Programmer > USBasp
Tools > Burn Bootloader

I upload the bootloader and now my board shows up in device manager as a USB serial device (COM5)
Port option is selectable under tools menu.

Now my boards are good to go!
Thanks for your inputs pert.

You're welcome. I'm glad to hear it's working now. Enjoy!
Per

My USBASPs are having the firmware compiled in 2011 available at USBasp - USB programmer for Atmel AVR controllers - fischl.de
What is your take on uploading the firmware discussed in the thread @github in your post
avrdude 6.3.0-arduino2 incompatible with USBasp using libusb-win32 driver · Issue #1 · arduino/avrdude-build-script · GitHub

The most noticeable advantage of the peterVH/bperrybap USBasp firmware is that it allows you to do Upload Using Programmer to chips with a lot of flash memory like the ATmega2560:

I like that firmware because it solves the one flaw I ever encountered with the USBasp, but it's also fairly rare for people to want to Upload Using Programmer to an ATmega2560, so the stock firmware will work fine for most. I actually don't have much experience with the official firmware from fischl.de. I've mostly worked with either the "Baite" firmware that comes on the common 6 pin USBasp from eBay, or the peterVH/bperrybap firmware.

Hi pert, can you share the link to the Baite firmware.

It's proprietary (probably in violation of the USBasp open source license). They lock the flash memory on the USBasp so that you can't download it. So the only way to have the firmware is to buy one of the Chinese USBasp, like this one: