www.mathertel.deArduino ProjectsUse an ISP Programmer to upload Sketches to an Arduino Board

Using an USB ISP programmer together with the Arduino environment

When starting with my DMX Shield project I often had to disconnect the shield from the board for uploading a new sketch to the board. This is because my layout uses the hardware serial interface that is also used by the Arduino bootloader an conflicts occur.

To end his situation I bought a cheap USB ISP programmer.

I had to search around the web for several hours go get it work with the Arduino environment by editing several setting-files by using a standard text editor (aka notepad).

Disclaimer and Recommendation

Make a backup of these files and close all Arduino windows before you start editing!

All the settings are made on your own risk !

So here are the tricks:

Registering the programmer

The Arduino environment knows about the available ways that can be used to communicate. The most often used by Arduino of course is using a serial port and the bootloader mechanism that listens for a new sketch just a few seconds after each reset.

Using a programmer is another option and all of these are configured in the file Programmers.txt that you can find inside the folder .\hardware\arduino\ in your Arduino installation.

Here you can find the available settings. The first word of each line is the technical identification of a programmer and you have 3 settings for each: the readable name, the communication and the protocol.

The USB ISP programmer I bought uses a protocol named "stk500v2" that is well known to the avrdude tool that the Arduino environment uses internally to upload so I had to add my programmer by using a new technical identifier (avrispv2) and the following textlines:

avrisp2.name=AVRISPv2
avrisp2.communication=serial
avrisp2.protocol=stk500v2
avrisp2.program.protocol=stk500v2
avrisp2.program.tool=avrdude
avrisp2.program.extra_params=-P{serial.port}

Now start the Arduino environment and have a try !

In the Arduino environment you can now select the just defined programmer and use the command "Burn bootloader" to put a fresh bootloader to the board and the menu entry "Upload Using Programmer" to upload the program by using the programmer.

Links