Turn Arduino into an AVR-ISP programmer

I’ve split the post in two parts not to annoy people with the story of how I got here but I needed to build myself an ISP programmer and I only had arduino boards lying around so I started searching. I have learned a few things from Guido Socher’s very informative website and I found his avrusb500.
Version 1.5 worked magically with a modified arduino using a 3.6MHz crystal
Then I set about modifying the code to make it run with 16MHz the standard Arduino. The code is not designed to run on different clock speeds so it needs to be changed in various places
I have now a version that works, it needs to be tested more because I am not so sure of the timings but try it out.
how to make it work
- Download this zip file and unzip it somewhere (better if there are no spaces in the directory name)
- Edit the file load.command to change the name of the port your arduino is attached to.
- Reset arduino and launch load.command, this uploads the avrusb500 firmware onto the board
- Wire up the Arduino like you see below
- After about 7 seconds your Arduino is ready to accept commands
- use avrdude to burn an hex file or change the fuses on a avr microcontroller.
I kept the serial speed at 115200 so that people don’t overwrite the bootloader by mistake…. :)
Now you can use Arduino as an ISP programmer for other boards or just the ATMega168 processors.
Connections between arduino and the target board.
| Arduino Pin | Pin on ISP connector |
| 12 | 1 - MISO |
| 13 | 3 - SCK |
| 10 | 5 - Reset |
| 11 | 4 - MOSI |
| GND | 6 - GND |
| 5V | 2 - 5V (optional) |
connect the 5v only if you want your Arduino to power the target board.
more details to come soon!
I need to turn this into a proper tutorial….
Szia from Budapest
21 Comments »
RSS feed for comments on this post. TrackBack URL
There’s further discussion over at the arduino forum:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1165363464/6
i am sorry, guido, but i do not know what are these pins: miso, sck and mosi????
please help me, i am desperate, i have 12 atmga8 without bootloader and the parallel port programmer i built doesn’t work!
thanks and regards.
sorry, for the last message! i found them.
the place where to change the port in load.command is “dserial=$PORT”, right? i just put a number instead of $PORT, right?
to launch load.command with windows xp do i use the command prompt?
thanks and regards.
BTW I’m not guido :) I’m massimo.. I’ve just built on Guido Socher’s amazing work.
Very cool! Thanks for this :)
That’s cool. I hacked together a program that implements the minimal stk500v2 protocol required to program my target to solve exactly this problem. It’s got some reliability and speed issues though, so I tried your program. Unfortunately I can’t get it to work at all. The only real difference is that I’ve got some 40109 buffers for the signals, because my target micro runs at 2.7V instead of 5V.
strace shows that the initial sequence never gets returned:
strace avrdude -c stk500 -P /dev/ttyUSB0 -p t26 -v
open(”/dev/ttyUSB0″, O_RDWR|O_NOCTTY) = 3
write(3, “0 “, 2) = 2
Any guesses what’s wrong?
Tim
So I figured it out. avrusb implements stk500v2, not stk500. So now it works great. Much faster and more reliably than my own hack. Thanks so much!
Take a look at buttload. it turns an avr butterfly into an ISP. http://www.avrfreaks.net/index.php?module=Freaks%20Academy&func=viewItem&item_id=517&item_type=project
I’ve got your method to work with an ATTINY13V with one small modification. The arduino’s resistor on pin 13 seems to drop the voltage too much. (See the schematic at http://www.potemkin.org/uploads/Pid/arduino_usb.jpg ) However you can bypass the resistor by using pin 3 on the ICSP header for SCK instead. I don’t know if this is only an issue on the ATTINY13V, but it now works for me.
Travis
actually that is a good suggestion… infact now on my arduino-ISP programmer I use the 6pin connector cable from my dead avr-isp to bridge the two isp connectors.
i’ve bent the reset pin in order to avoid pressing reset on both boards… i the manualy reset the target board during programming
Hi,
Could you please point me out how to configure the USB in load.command and how you launch load.command in the window XP environment? Thanks in advance…
Regards,
Bryan
[...] Originally Syndicated via RSS from del.icio.us/tag/diy [...]
[...] tinker.it » » Turn Arduino into an AVR-ISP programmer - Original link [...]
[...] you start from massimo’s post you can already build your own, but he doesn’t have much time to write about a more thorough [...]
I am looking for advice:
I followed the instructions (almost) exactly and received this error: “Direct Parallel Access not defined”
The usb device does show up because more /proc/bus/usb/devices shows an entry for Vendor=0403 ProdID=6001…
I tried the following command with both the uisp in tools directory of arduino-0007 and a patched uisp that I compiled myself following the directions given on tuxgraphics.org:
/home/david/Desktop/arduino-0005/tools# uisp -dpart=ATmega8 -dprog=stk500v2 -dserial=”/dev/ttyUSB0″ -dspeed=115200 –erase –upload if=avrusb500.hex -v
if I change -dprog to stk500, the error changes to “Programmer is not responding.”
I’m trying to use the bitbang method, is this even the right approach?
I am new to this and if you spot something I’m doing wrong I would be much appreciative. I have also tried to build three different parallel port programmers with no luck. I’m about ready to buy a programmer lol.
Hi,
that doesn’t seem to work for me, I can barely read out flash from an atmega32 without any timeouts. I just got it working once out of 50 times and haven’t even checked if the image is correct. Even reading the device id correctly, doesn’t work all the time, sometimes one byte is corrupt.
No luck with writing to an controller either. I used the pins as described in here and SCK from the ICSP pins on the arduino ng board. No positive results either.
So, I tried to get that running for hours now and others failed too, so better safe your time and get a different programmer.
Just to point out this was built with a Diecimila 168 board initially and hasn’t been updated for the newer board as this post was written back in 2006!
[...] arduino as avr-isp programmer HERE [...]
[...] then make a cable to connect from your ICSP to your arduino, the pins gnd, 5v, 10, 11, 12 & 13 of the ICSP need to connect to the six pin header on the arduino. more is described here: http://tinker.it/now/2006/12/04/turn-arduino-into-an-avr-isp-programmer/ [...]
[...] it possible to use an Arduino to reflash the chip as an ISP programmer or via [...]