Uno to Uno - ICSP to ICSP

Hi All,

I've tried searching the internet thin of information on the following question, but i haven't had any luck finding the answer.

My general question is that i want to program an Arduino UNO from another Arduino UNO using only the ICSP connection turning my Arduino into a sort of Atmel AVRISP mkII.

Does anyone know if that is possible at all?

I've succeeded to upload sketches and burn boot loaders, but only through jumper wires.

Thank you very much,
Steve

You can program an Uno using only the ICSP header on the target board. The board acting as the programmer won't - I guess you could use 5 of the 6 pins on ICSP header for that, but one of the pins goes to reset - on the programmer, that needs to go to an IO pin.

I have a pro mini (clone, ofc) dedicated to being an ICSP programmer. I soldered the wires right onto it and covered all the connections in hot glue for durability.

No. Connecting the two RESET pins together is counter-productive.

I believe you can get (and can certainly make) a simple shield that brings the six pins together for a standard ISP connector.

If you look at the schematics it seems PIN 5 is directly connected to RESET_EN, just like pin 10 on the board.

Shouldn't that do the job then?

See Nick Gammon's Program Bootloader and Hex Uploader write-ups to do that.

The Uno doing the programming uses D10 to control Reset on the board being programmed.

I am big fool who can't read in the schematics correctly :slight_smile:
On the programming Arduino Uno PIN10 needs a connection otherwise, of course it won't work with an ICSP-to-ICSP cable alone.
By soldering a wire from PIN10 (SS) directly to PIN5 on the ICSP connector, the Uno can be used as the AVR-ISP programmer for any targeted AVR's.

(just if anyone else should look at this post in the future)

Thanks for the contribution guys (y)

The Uno doing the programming uses D10 to control Reset on the board being programmed.

Isn't that the same wiring used to program (upload sketches) to an ATtiny85 ? (except the UNO to be programmed would take the place of the ATtiny and the SPI pins would connect the same way)

I have two UNOs (and also two standalone ATmega328s breadboarded) but have never tried that.
The only thing that puzzles me is that the pin names on the ATtiny and the UNO in the attached schematic
show:

PROGRAMMER TARGET uP
MISO (UNO-pin-12) => MISO (ATtiny85-pin-6)
MOSI (UNO-pin-11) => MOSI(ATtiny85-pin-5)
SCK (UNO-pin-13) => SCK (ATtiny85-pin-7)
SS (UNO-pin-10) => RST (ATtiny85-pin-1)

so if you substitute an UNO for the ATtiny , you get:
PROGRAMMER TARGET uP
MISO (UNO-pin-12) => MISO (UNO-pin-12)
MOSI (UNO-pin-11) => MOSI (UNO-pin-11)
SCK (UNO-pin-13) => SCK (UNO-pin-13)
SS (UNO-pin-10) => RST (UNO-ICSP HEADER-pin-5) (see attached ICSP header pinout)

The only thing that puzzles me is :

Why is MISO => MISO
and MOSI => MOSI
?
Shouldn't it be :
MOSI => MISO
MISO => MOSI ?

By soldering a wire from PIN10 (SS) directly to PIN5 on the ICSP connector, the Uno can be used as the AVR-ISP programmer for any targeted AVR's.

If you solder a jumper wire to the Target UNO ICSP pin-5 ribbon cable then you can just plug it into the pin-10 on the Host UNO header.

ICSPHeader.jpg

MISO = Master In Slave Out. The Uno (programmer) is Master. The ATtiny (target) is Slave. The Master knows it is Master because we told it that it is Master so it makes the pin an input. The Slave knows it is a Slave because RESET is asserted so it makes the pin an output. Vice versa for MOSI. Make sense?

MISO = Master In Slave Out. The Uno (programmer) is Master. The ATtiny (target) is Slave. The Master knows it is Master because we told it that it is Master so it makes the pin an input. The Slave knows it is a Slave because RESET is asserted so it makes the pin an output. Make sense?

Totally. The one who can inflict a RESET on the other one is the MASTER and the one being subjected to
the RESET is the SLAVE . It's a SLAVO-MASTERCHISTIC relationship.... ;D

:grin: