Here's something fun: it's an Arduino Uno doing ISP on itself!
The 8U2 USB chip is running modified software - essentially the standard USBserial code, merged with a heavily modified version of the ArduinoISP sketch. The nice thing is that it can switch between normal operation and ISP just by adding or removing a jumper.
If anybody is interested in trying out this code, let me know and I'll tidy it up and write some instructions. You'll need an Uno R2 (R1 will not work; R3 is probably ok but I don't have one to test) and either an ISP programmer or another Arduino. Some soldering is required (to add the extra header pins). You'll also need to be fairly confident about reprogramming the 8U2 - as always with ISP, there's potential for bricking the device if anything goes wrong.
Looks like a slick mod to the Arduino - What ISP do you tell AVRDude you are using?
I could see making a cable that when plugged in puts the 8U2 in ISP mode and when removed it works in normal Arduino mode.A 10 pin connector on the one end witht he 2 pins shorted. A six pin connector on the other end.
This might be a good addition to the Arduino design. And it could be used without having to load a sketch in your Arduino chip.
Will you post your code and the procedure for loading it in the 8U2?
Tim7 - Could you also reverse this? Could you download a program to the 328 that could then reprogram the 8U2? Are the signals available on pins to do this?
This would be something like what the optiLoader does?
OK, here it is: http://timgiles.free.fr/arduino-usbisp.zip
The zip-file contains the hex file, instructions, some useful pictures, and some bat files which should make the whole procedure relatively painless.
Note that this is a first version, and may contain bugs. Read the warnings and caveats in readme.txt.
Please report your successes or failures here. Once a few people have got it working I'll post a proper write-up on the Playground.
The version I posted 2 days ago might not have worked with the normal Uno USB driver. If anybody actually tried it and ran into this problem, I apologize! I have corrected the problem, and added the source code. The link is the same as before.
OK, I just checked the binaries and fuse settings for the 16U2 chip on the Uno-R3, and they're all the same as for the 8U2. So to upload to the Uno R3 all you need to do is modify line 11 of program_usbisp.bat to read
Cool,
One ques. The jumper, does it need to be held constant? Or can I like put a pushbutton there and just hold it while I first plug it in, or just when uploading?
To stay in ISP mode the jumper needs to be constantly in-place. As soon as the jumper is removed it reverts to "normal" mode (or after a few seconds timeout, if in the middle of executing a programming command).
I had a go at converting Adaloader to write the 8U2 firmware, but it seems to get its flash pages in a muddle. If I can get it to work you won't need the second Arduino: updating the 8U2 would be as simple as loading a sketch, connecting a few wires, and hitting reset.