Pages: [1]   Go Down
Author Topic: Suggestion to add pin 10 with jumper to ICSP on UNO R4  (Read 2356 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 18
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've just purchased an UNO R3 a few months ago and I am already enjoying the knowledge I've gained by digging into the hardware.  I've also started purchasing several Atmega328s with Arduino bootloader for DIY breadboarding.  Once I figured out that I can't program two 328s using the UNO's 16U2, I looked into using the ICSP headers as an alternative option. (You could also remove the onboard 328 and it will program the breadboard 328 just fine)

To my dismay, it appears after much research that the ICSP is meant to program the onboard 328 only and would require a bypass to pin 10 to make use of the header to program other AVR chips. 

My suggestion is to add a trace along with a user select-able header to the ICSP header for the next revision of the UNO. One side would link directly to the Reset line, the other side would go to pin 10.  I hope this makes sense.
Logged

Colorado
Offline Offline
Edison Member
*
Karma: 47
Posts: 1562
Reviving dead brain cells with Arduinos.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Why bother?  Load the ArduinoISP sketch onto your Uno, connect MOSI,MISO,CLK to the breadboard AVR, connect pin 10 to the reset of the breadboard AVR, supply VCC/GND to the breadboard AVR.  In Tools -> Programmer set it to Arduino as ISP and you're done.  You can burn bootloaders, you can upload code, all without needing to make any physical changes to your Uno.
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 537
Posts: 27067
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

Adding pin 10 to the header would interfere with ICSP programmers, which are expecting SCK, MISO, MOSI, Reset, Gnd, and Vcc (3.3V or 5V).

One could add a 3-pin header to allow selection of D10 or Reset to be connected via jumper configuration.
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.

Offline Offline
Newbie
*
Karma: 0
Posts: 18
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Why bother?  Load the ArduinoISP sketch onto your Uno, connect MOSI,MISO,CLK to the breadboard AVR, connect pin 10 to the reset of the breadboard AVR, supply VCC/GND to the breadboard AVR.  In Tools -> Programmer set it to Arduino as ISP and you're done.  You can burn bootloaders, you can upload code, all without needing to make any physical changes to your Uno.

Because an ICSP cable is much cleaner to work with?  Again, it's a suggestion that I think would eliminate the rat's nest of wiring.  I bought ten 328s that I hope to use often and I, for one, would find that convenience of moving a simple jumper quite useful.

One could add a 3-pin header to allow selection of D10 or Reset to be connected via jumper configuration.

I did say that, if you re-read my last sentence, though you said it more concisely then I did.   smiley
Logged

Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 206
Posts: 12897
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


http://www.gammon.com.au/forum/?id=11635
...scroll down a bit.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 18
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, I am aware that I can permanently modify an ICSP cable to address this. I saw it during my research before I posted. However, I only have one of these cables and I'm not planning to purchase a spare to do this modification.

Edit to clarify:  I'm opposed to buying a cable that I would permanently alter for a single purpose versus purchasing a more expensive revised Uno board that I could make use of for multiple purposes.
« Last Edit: May 25, 2013, 10:43:16 am by LTU1 » Logged

Left Coast, CA (USA)
Online Online
Brattain Member
*****
Karma: 361
Posts: 17294
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've just purchased an UNO R3 a few months ago and I am already enjoying the knowledge I've gained by digging into the hardware.  I've also started purchasing several Atmega328s with Arduino bootloader for DIY breadboarding.  Once I figured out that I can't program two 328s using the UNO's 16U2, I looked into using the ICSP headers as an alternative option. (You could also remove the onboard 328 and it will program the breadboard 328 just fine)

To my dismay, it appears after much research that the ICSP is meant to program the onboard 328 only and would require a bypass to pin 10 to make use of the header to program other AVR chips.

My suggestion is to add a trace along with a user select-able header to the ICSP header for the next revision of the UNO. One side would link directly to the Reset line, the other side would go to pin 10.  I hope this makes sense.

That is a fact that the ICSP pins on most any AVR board is wired up such to allow the AVR chip on the board to be programmed rather then to be a programmer for external AVR chips. You solution would be useful for sure but the arduino 'company' has been reluctant to have user jumper pins on their basic boards, most likely to eliminate a possible confusion/error point for new beginners.

 The first USB Arduino board used a 3 pin jumper selection to allow the board to get it's power from either USB or the on-board +5vdc regulator, then on subsequent boards they eliminated that manual option and designed auto-voltage selection circuity to perform that function automatically. Some of us would have preferred the original manual voltage selection method but it's pretty clear that one Arduino design goal is to make it's use as simple as possible for beginners, which means no jumpers that could be placed in the wrong position.

The solution I used was the method Nick suggested in his web site (see first picture in link below) to modify a standard 6 pin IDC cable to 'break out' the wire needed to generate the reset signal for the external AVR chip to be programmed. I found such cables available from Asian E-bay sellers for about $1 each.

http://www.gammon.com.au/forum/?id=11635

Lefty
« Last Edit: May 25, 2013, 11:59:32 am by retrolefty » Logged

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 133
Posts: 6747
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I'm opposed to buying a cable that I would permanently alter for a single purpose versus purchasing a more expensive revised Uno board that I could make use of for multiple purposes.
There's a saying in the open source community:  "Feel free."

By using ArduinoISP, you've put yourself among a minority of Arduino users.  Increasing the expense of the "revised Uno" to serve such a small minority would not be a good idea.

You can easily make an "ISP shield" with a programming header as you want, or even with a ZIF socket for chips.  In fact, this has been done a couple of times and you can buy one.  http://shop.evilmadscientist.com/productsmenu/tinykitlist/253 is one example.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 18
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That is a fact that the ICSP pins on most any AVR board is wired up such to allow the AVR chip on the board to be programmed rather then to be a programmer for external AVR chips. You solution would be useful for sure but the arduino 'company' has been reluctant to have user jumper pins on their basic boards, most likely to eliminate a possible confusion/error point for new beginners.

 The first USB Arduino board used a 3 pin jumper selection to allow the board to get it's power from either USB or the on-board +5vdc regulator, then on subsequent boards they eliminated that manual option and designed auto-voltage selection circuity to perform that function automatically. Some of us would have preferred the original manual voltage selection method but it's pretty clear that one Arduino design goal is to make it's use as simple as possible for beginners, which means no jumpers that could be placed in the wrong position.
That is an interesting observation and I agree that a choice to K.I.S.S. may be the reason it isn't part of the design.

There's a saying in the open source community:  "Feel free."

By using ArduinoISP, you've put yourself among a minority of Arduino users.  Increasing the expense of the "revised Uno" to serve such a small minority would not be a good idea.

You can easily make an "ISP shield" with a programming header as you want, or even with a ZIF socket for chips.  In fact, this has been done a couple of times and you can buy one.  http://shop.evilmadscientist.com/productsmenu/tinykitlist/253 is one example.

I do feel free.  I feel free to suggest this.  I also could easily purchase a USBtinyISP clone on ebay for $10 or several other options.  Perhaps my perspective that this suggestion is a good idea to include in the next revision puts me in the minority.  However, Arduino has seen fit to address this minority by including ArduinoISP in their reference library and that indicates to me that the minority may not be so small as you would think.  Heck, I found myself, a relative beginner, looking hard at this in the first 90 days of owning an Uno board because of this limitation.

The ISP shield is very intriguing.  I thank you for pointing it out to me as it never occurred to me that such a shield existed.  It basically takes all of the items on my bread board and puts it right on top.  Though the caveats in their Wiki doesn't bode well for my Uno.  After viewing the shield, I may pick up a ZIF socket and see if I can shoehorn it into the DIP socket on the Uno.  That would be the easiest path for what I am currently doing.
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 537
Posts: 27067
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

At some point, it becomes easier to just spend a couple of dollars and have a tool versus the extra downloading and setting up & stuff.
I used this one for a long time for 328P's
http://www.mdfly.com/index.php?main_page=product_info&cPath=5&products_id=415
other versions are available too
$4 http://www.hobbyking.com/hobbyking/store/__27990__USBasp_AVR_Programming_Device_for_ATMEL_proccessors.html
https://www.sparkfun.com/products/9825
http://www.adafruit.com/products/46

before I got an Atmel MKii for 1284P bootloading
http://www.mouser.com/ProductDetail/Atmel/ATAVRISP2/?qs=sGAEpiMZZMurtJ7VwBTl0Yn98AREnSh5M%2fUVM9qhaqI%3d
(tho it was $4 less at the time)
and now I use that for everything.

I put a 2x3 header in designs for programming, or a smaller one  like a JST connector and use an adapter cable, no more fooling around with plugging chips in & out.
« Last Edit: May 25, 2013, 08:42:57 pm by CrossRoads » 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.

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 133
Posts: 6747
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Though the caveats in [the ISP Shield] Wiki doesn't bode well for my Uno.
Note that all of those caveats apply equally to any other physical mechanism for using the Uno as an ISP programmer.  They reflect limitations related to the Arduino itself rather than things specific to the shield.

You might also want to look at http://www.adafruit.com/products/462 where they pretty much use a prototype shield to build a ZIF programmer.  (note that the Arduino can not program its own cpu, so putting a ZIF socket in the current ATmega location probably doesn't do anything helpful.)

If ArduinoISP were heavily used, a REAL jumper for disabling auto-reset would probably be more useful than the switchable RESET on the ISP connector.  (Pretty soon you'd have something like the original STK500, with so many jumpers that you can hardly ever configure it correctly for anything, on the first try...)
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 48
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Just pony up the 50USD for an AVR Dragon. Problem solved, and you get to do good debugging too.  smiley-mr-green
That is what I did, and I am extremely happy with it.
I reprogram all my AVRs to use JTAG instead for debug as well, that way the SPI stuff is left alone for -- well, SPI stuff.
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 537
Posts: 27067
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

No JTAG IO on 328s tho.

I agree about having a good tool otherwise - like Atmel AVR ISP MKii for programming.
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.

Offline Offline
Newbie
*
Karma: 1
Posts: 48
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

No JTAG IO on 328s tho.

I agree about having a good tool otherwise - like Atmel AVR ISP MKii for programming.
You can insert the chip right on the dragon if you put a ZIF socket on it, and program it that way too. You don't need a separate programmer to do this. The dragon can do both.
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 537
Posts: 27067
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

Moving chips back & forth sucks. I put programming connections on my boards so you don't have to do that.
328 still does not have JTAG support, is not built in to the chip.
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.

Pages: [1]   Go Up
Jump to: