Sunday, September 18, 2016

Analysing the BAITE USBasp_H6 AVR programmer clone

At my day job, we bought a batch of BAITE USBasp_H6 branded AVR ISP programmers.



Now it seems that from the batch of the ISP programmers we will likely use just a handful for its original purpose. Now what to do with the rest? I thought the board may make a nice low cost general purpose micro controller platform, if only a handful of I/O pins are required for the project.

The BAITE USBasp_H6 is a clone of 

On the following schematic diagram, the simplifications of the original design were marked with a red pen. The BAITE USBasp is equipped with a standard AVR SPI(ISB) 6 pin connector, which I have drawn in red as well.


The BAITE USBasp_H6 clone is equipped with an AVR ATMega8A micro controller

The ATMega8A is quite powerful. It contains 8KB FLASH, 512B EEPROM and 1KB SRAM, a hardware multiplier, 10bit A/D converter, one 16bit timer etc. When looking at the schematic, 4 general purpose pins are accessible at the programming connector and two A/D input pins are accessible at the LED terminals, if the two LEDs are removed. Another two general purpose pins are accessible at the D- and D+ pins of the USB connector, although one would likely need to remove the two Zener diodes D1,D2 and the resistor R3, and one would likely need to bridge R1 and R2.

Here is an example WinAVR project to blink one of the LEDs on the programmer board:
https://drive.google.com/open?id=0B__0isr7bX1gbFV3cG5LeFZYTHc

The cool thing about these programmers is, one may use the provided programming cable to program one programmer with the other. The programmed device needs to have the reset pin of the ATMega8A controller connected to the reset pin of the 6-pin connector. The BAITE USBasp_H6 boards provides two tiny soldering points, which need to be bridged, see the following picture.


The BAITE branded programmer was delivered flashed with a customized firmware, which I was unable to get working with avrdude. I flashed the board with the precompiled hex file usbasp.2011-05-28\bin\firmware\usbasp.atmega8.2011-05-28.hex http://www.fischl.de/usbasp/

According to the advice of the usbasp author, I used the application ZADIG http://zadig.akeo.ie/ to configure the USB driver for the programmer. Surprisingly, the USBasp programmer gets a Microsoft driver installed, which does not work correctly with avrdude. With the help of ZADIG, I installed libusbK v3.0.7.0, with which the avrdude is happy.