Pages: [1] 2 3   Go Down
Author Topic: Self-ISP on an Uno  (Read 6862 times)
0 Members and 1 Guest are viewing this topic.
Switzerland
Offline Offline
Sr. Member
****
Karma: 6
Posts: 375
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 Offline
Full Member
***
Karma: 2
Posts: 223
Arduino BBB
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That's pretty glorious, I love it.
Logged

South Texas
Offline Offline
Edison Member
*
Karma: 8
Posts: 1025
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 Offline
Brattain Member
*****
Karma: 544
Posts: 27352
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

This is comparable to what you could do with a duemilanove.

http://www.geocities.jp/arduino_diecimila/bootloader/index_en.html

Early rev Uno's did not support, it is nice that the later ones finally broke out the pins to support this.

Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Anchorage, AK
Offline Offline
Edison Member
*
Karma: 42
Posts: 1176
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 Offline
Full Member
***
Karma: 2
Posts: 184
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 Offline
Sr. Member
****
Karma: 6
Posts: 375
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Mmm, yes that should work.  Give me a little more time to tidy up the code & I'll post it here.
Logged

Fort Lauderdale, FL
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6144
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.c

Greenville, IL
Offline Offline
Edison Member
*
Karma: 15
Posts: 1330
Warning Novice on board! 0 to 1 chance of errors!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


  Nice work Tim7! You deserve a round of applause for your innovation.
Logged


Offline Offline
Edison Member
*
Karma: 5
Posts: 1730
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 Offline
Sr. Member
****
Karma: 6
Posts: 375
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Switzerland
Offline Offline
Sr. Member
****
Karma: 6
Posts: 375
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.zip

The compilation procedure is the same as for the standard Arduino USB code, and requires LUFA v100807 and WinAVR v20100100.
Logged

Switzerland
Offline Offline
Sr. Member
****
Karma: 6
Posts: 375
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

...and the silence was deafening.  Instructions unclear?  Installation too difficult?  Or just everybody that needs an ISP programmer already has one?
Logged

Offline Offline
Edison Member
*
Karma: 5
Posts: 1730
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Lol im waiting for my r3 off ebay, ill let you know as soon as I get it
Logged

South Texas
Offline Offline
Edison Member
*
Karma: 8
Posts: 1025
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Just not quite ready to zap my only working Arduino.... I guess I am wearing my chicken suit...
Logged

Pages: [1] 2 3   Go Up
Jump to: