Switzerland
Offline
Sr. Member
Karma: 5
Posts: 370
|
 |
« on: April 16, 2012, 09:13:51 pm » |
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.  
|
|
|
|
|
Logged
|
|
|
|
|
Humboldt, CA
Offline
Full Member
Karma: 1
Posts: 220
Arduino BBB
|
 |
« Reply #1 on: April 16, 2012, 09:34:19 pm » |
That's pretty glorious, I love it.
|
|
|
|
|
Logged
|
|
|
|
|
South Texas
Offline
God Member
Karma: 8
Posts: 978
|
 |
« Reply #2 on: April 17, 2012, 11:23:56 am » |
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?
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 270
Posts: 17040
Available for Design & Build services
|
 |
« Reply #3 on: April 17, 2012, 11:46:57 am » |
This is comparable to what you could do with a duemilanove. http://www.geocities.jp/arduino_diecimila/bootloader/index_en.htmlEarly rev Uno's did not support, it is nice that the later ones finally broke out the pins to support this.
|
|
|
|
|
Logged
|
|
|
|
|
Anchorage, AK
Offline
Sr. Member
Karma: 10
Posts: 494
|
 |
« Reply #4 on: April 17, 2012, 02:10:49 pm » |
Kick ass! Dunno if I'd use it, since I tend to use ICSP only for naked chips, but that gets +10 clever points for sure.
|
|
|
|
|
Logged
|
|
|
|
|
Upstate NY
Offline
Full Member
Karma: 2
Posts: 172
|
 |
« Reply #5 on: April 17, 2012, 04:20:34 pm » |
Great idea!
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?
|
|
|
|
|
Logged
|
|
|
|
|
Switzerland
Offline
Sr. Member
Karma: 5
Posts: 370
|
 |
« Reply #6 on: April 18, 2012, 04:18:15 am » |
Mmm, yes that should work. Give me a little more time to tidy up the code & I'll post it here.
|
|
|
|
|
Logged
|
|
|
|
|
Austin, TX
Offline
Faraday Member
Karma: 42
Posts: 5248
CMiYC
|
 |
« Reply #7 on: April 19, 2012, 08:58:11 am » |
Mmm, yes that should work. Give me a little more time to tidy up the code & I'll post it here. Please post this procedure in the Playground!
|
|
|
|
|
Logged
|
|
|
|
|
Greenville, IL
Offline
Edison Member
Karma: 11
Posts: 1290
Warning Novice on board! 0 to 1 chance of errors!
|
 |
« Reply #8 on: April 19, 2012, 11:16:00 am » |
Nice work Tim7! You deserve a round of applause for your innovation.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Edison Member
Karma: 3
Posts: 1713
|
 |
« Reply #9 on: April 19, 2012, 11:49:06 am » |
Yes please, id love to see how you did it I actually posted not to long ago I had this same idea, but no idea how to do it lol
|
|
|
|
« Last Edit: April 19, 2012, 11:59:13 am by winner10920 »
|
Logged
|
|
|
|
|
Switzerland
Offline
Sr. Member
Karma: 5
Posts: 370
|
 |
« Reply #10 on: April 19, 2012, 06:19:41 pm » |
OK, here it is: http://timgiles.free.fr/arduino-usbisp.zipThe 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.
|
|
|
|
|
Logged
|
|
|
|
|
Switzerland
Offline
Sr. Member
Karma: 5
Posts: 370
|
 |
« Reply #11 on: April 22, 2012, 11:27:59 am » |
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. http://timgiles.free.fr/arduino-usbisp.zipThe compilation procedure is the same as for the standard Arduino USB code, and requires LUFA v100807 and WinAVR v20100100.
|
|
|
|
|
Logged
|
|
|
|
|
Switzerland
Offline
Sr. Member
Karma: 5
Posts: 370
|
 |
« Reply #12 on: April 26, 2012, 05:23:21 pm » |
...and the silence was deafening. Instructions unclear? Installation too difficult? Or just everybody that needs an ISP programmer already has one?
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Edison Member
Karma: 3
Posts: 1713
|
 |
« Reply #13 on: April 26, 2012, 10:50:38 pm » |
Lol im waiting for my r3 off ebay, ill let you know as soon as I get it
|
|
|
|
|
Logged
|
|
|
|
|
South Texas
Offline
God Member
Karma: 8
Posts: 978
|
 |
« Reply #14 on: April 27, 2012, 04:39:31 pm » |
Just not quite ready to zap my only working Arduino.... I guess I am wearing my chicken suit...
|
|
|
|
|
Logged
|
|
|
|
|
|