AVRDude with Kanda AVRISP

AVRDude is free open source software for programming AVR devices. It is command line based but can be run from a batch or make file. It is the main programming utility used by Arduino software when the target board does not have a bootloader.

Our low cost AVR USB programmer, AVRISP-U, can be used with AVRDude. This allows it to be run on Linux as well as Windows. It can be used with Arduino on Linux and maybe Windows but this is not 100% resolved.

The first step is to add the following to AVRDude.conf file.

programmer
id_type = “avrisp-u”;
desc = “FT2232D based generic programmer”;
type = “avrftdi”;
usbvid = 0x0403;
usbpid = 0x6001;
usbvendor = “”;
usbproduct = “”;
usbdev = “A”;
usbsn = “AVR”;
#ISP-signals -ADBUS
reset = 5;
sck = 1;
mosi = 2;
miso = 3;
buff = 6;
#LED SIGNALS – ACBUS
pgmled = ~ 11;
;

Please note the trailing semi-colon (;), it is needed. This definition is for AVRDude 5.11 and later as the type property has changed from a constant to a string. It is now type = “avrftdi” but older versions will need type = avrftdi. Older versions may also use pin 0 instead of pin 1 as the first pin, so you would need to change pin definitions by deducting one.

The version of AVRDude you use needs to be build with LibUSB and libFTDI included.  Prebuilt versions for Linux are available. On Windows, it should be possible but we have encountered problems. We could not find a built version with LibUSB and LibFTDI included, so we built it v6.1 ourselves ok (using MinGW shell) and replaced the programmer FTDI driver with LibUSB, its open source equivalent.  AVRDude still would not open the USB port, giving error 3, 4 or 5. Not sure what the problem is now on Windows.

With Arduino, you need to add a new programmer to programmer.txt file. This new programmer will use avrftdi protocol. It will then appear in Tools menu  -> Programmers. If you select this new programmer, it will be used when you upload to the board using File menu -> Upload using Programmer.

AVR USB Programmer

Leave a Reply

Your email address will not be published. Required fields are marked *