Hobbyking sold a USBasp programming adapter that many people reported problems with, principally that Windows complained that the device was not recognised.
If the device is not recognised in Windows, then Windows cannot associate the correct driver with the device, and it just won't work.
Fig 1 shows a Hobbyking USBasp purchased in May 2013. The item has since been withdrawn from sale without explanation or follow up to recent purchasers (more on that later).
On delivery, the device was not recognised in Windows, and on a machine that other USBasp programmers work fine (ie drivers installed, devices recognised, and targets read and written successfully).
I have read the device and I can report that the fuses are default (H=0xDF L=0x62 E=0x01), lock bits default, so importantly, it is not read protected.
The flash is empty, and the EEPROM is empty.
With default fuses and empty flash and EEPROM, it is unlikely that this chip was ever programmed.
I reported the problem to HK support and they said "please send us photos/ and or video link and send it at firstname.lastname@example.org so that we may forward it to our product specialist for review".
I declined to waste any more time on them, they cannot tell from a video that the thing is unprogrammed, and they surely must know the product has problems because of the discussion on the product page before they removed it.
So, if you have one of these things, you have to get another programmer and program flash and fuses (see http://www.fischl.de/usbasp/). Note that AVRDUDE does not know about a Atmega48PA and the device signature is different to the m48 entry... so use -p m48 and -F to force it to ignore the device signature conflict.
Where will you get another programmer? Well, don't go to Hobbyking, try eBay. I have had success with ALL the Baite branded jobbies I have bought.
Now that you have it working, the thing uses a 4kB chip and it will not hold the latest firmware (inc revised USB).
The datecode on my 48PA puts it a almost 3 years old, perhaps the manufacturer got a good buy on some old chips. The '48PA was a low voltage low power device, none of which are relevant in this application as the chip runs at USB voltage.
Fig 2 shows the adapter with the chip removed and pads reflowed for replacement with an Atmega8A which has 8kB flash and can load the 2011 version of USBasp with updates that include a new USB driver.
Fig 3 shows the adapter with an Atmega8 chip salvaged of a faulty PCB (hand soldering recovered chips never looks as nice as reflow soldering of new chips). The revised programmer runs the latest USBasp firmware (2011), and works as it should,
All Hobbyking needed to do to deliver a good product was to:
The shunt on the board is JP3 (remove it, you will probably not need it since support for AVRDUDE's -B parameter), the solder link right in the corner of the board is JP1 (target power - default is ON), and the other is JP2 (allow programming via the ISP connector), see Fischl's USBasp circuit.
So, if you have one of the un-programmed Hobbyking USBasp and you got the runaround from customer support, you might want to reprogram it yourself.
You will need another working programmer. For this article, I have used a Baite USBasp from eBay and a 10pin-F to 6pin-M adapter also from eBay (some sellers offer both as a package for about $6 incl post).
For this procedure I used a USBasp operating at 5V, and supplying 5V to the target via the ISP lead.
You also need to fetch the FW from http://www.fischl.de/usbasp/ , download the latest zip and extract the FW appropriate to your chip (check what is on your HK board) into a working directory. The firmware for an Atmega48x will be older timestamp as the latest drivers and revisions do not fit in the 4kB chip. Read the readme file in the zip to get the appropriate fuse settings for your chip.
Don't use the libusb files from this zip, they are stale. If you need libusb, get it from from libusb-win32 wiki.
Fig 3 shows the location of the unlabeled JP2 link which must be closed to program this device from another programmer via the ISP cable. Solder a bridge on it, or if you are clever, use a small screwdriver to hold it shorted ALL the time the AVR command is running.
Install the SLOW_SCK link on the programmer plugged into the USB port (not the target) (a default chip has a 1MHz clock and SLOW_SCK link is a simple way to reduce SCK speed).
The AVRDUDE command for my original HK board is:
avrdude -F -p m48 -P usb -c usbasp -U flash:w:usbasp.atmega48.2009-02-28.hex:i -U hfuse:w:0xdd:m -U lfuse:w:0xff:m
The -F option is needed for an Atmega48PA (used on my board) as its signature is different to the Atmega48 known in avrdude.
Run the command and watch the messages that everything was successful.
Remove the JP2 link, disconnect the cables and plug the HK USBasp into a USB port and it should be recognised. Go ahead and test it fully.
© Copyright: Owen Duffy 1995, 2017. All rights reserved. Disclaimer.