Archive for August, 2015

Cheap Chinese USB ISP Programmers

Saturday, August 1st, 2015

The assembled unit, ready for use

The assembled unit, ready for use (click to zoom)

I bought one of these convenient little USB ISP programmers from a Chinese mail-order supplier while stocking up on Arduino parts and tools. I didn’t have a particular use in mind at the time, it was just an impulse purchase and I tossed it in my tool box without trying it out. Yesterday I suddenly wanted to examine the embedded AVR chip in a production device (not my own project) and dug out this programmer and tried to use it.

It turns out that most of these cheap Chinese USB ISP programmers (there are many variations and sellers) are shipped with firmware that doesn’t work with avrdude (the standard open-source AVR programming software). Fortunately, they are built out of an Atmel MEGA8 microcontroller, and it is usually possible to install the excellent, open-source USBasp firmware on them. Doing this can be tricky, however; the various designs use various different MEGA8 pin assignments for some of their functions.

The guts of the programmer showing the temporary tiny wire modification

The guts of the programmer showing the temporary tiny wire modification (click to zoom)

The one I have is a bit unusual in its use of GPIO pins so I had to make some changes to the code. But more annoying was the fact that it didn’t have a provision for (self) programming – no jumper or pad for connecting the reset signal for in-circuit programming. So to re-program it I had to solder a wire from one of the AVR pins to one of the ISP connector pins. And of course, after all that, to program it I needed – what else – a programmer. Luckily, I had an Atmel STK-500, which is a bit awkward to use, but worked well enough.

My modified USBasp code is here: source patch binary image
The site I bought it from is here: USB 2.0 ISP ASP Programmer Download Adapter
(But I don’t particularly recommend this seller because they take months to deliver to the US.)

Thank you to CE’s & PP’s Tech Blog for a good description of a similar hack to a similar cheap Chinese USB programmer.

The original firmware looked like this when connected:

usb 2-1.3: new low-speed USB device number 14 using ehci-pci
usb 2-1.3: New USB device found, idVendor=03eb, idProduct=c8b4
usb 2-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 2-1.3: Product: USBHID
usb 2-1.3: Manufacturer: zhifengsoft
hid-generic 0003:03EB:C8B4.0007: hiddev0,hidraw2: USB HID v1.01 Device [zhifengsoft USBHID] on usb-0000:00:1d.0-1.3/input0