ISP!

Hi all,

I recently bought a Pro Mini and an Uno. I was wondering - as far as I know, the Uno cannot yet be used as an ISP (judging by the pinned post on the bootloader, it sounds like they’re making progress with it though!). Is there any way to use the Pro Mini as a bootloader?

the Uno cannot yet be used as an ISP

Wanna bet?

It can be?

Are these the precise instructions? http://arduino.cc/en/Tutorial/ArduinoISP

Close. Add step 1.5...

1.5 Disable auto-reset. Instructions are available here... http://www.arduino.cc/playground/Main/DisablingAutoResetOnSerialConnection

However, if your Uno was "recently" purchased or if you have updated the bootloader, it is not necessary to disable auto-reset. If you are using Arduino IDE 1.0 then the stock ArduinoISP sketch does not work; report back if you are using 1.0 and need help.

Oh, and sorry to be so rude. Hello to you.

Hi Coding Badly,

:) it's all good!

Yeah I'm currently working on 1.0, but I did read one of the posts here that said using 0023 was successful. Was going to PM you regarding your version of the sketch though.

I bought the Uno just yesterday - rev3.

Thanks for the help!

I have heard problems with version 1.0 and Arduino ISP. I am not sure if this is true or not but if it doesn't work, you should try downgrading your Arduino IDE.

Hi all,

Reporting back..

avrdude: stk500_recv(): programmer is no responding.

I tried the configuration w/ no external oscillator - is that going to be a problem? That includes downloading the breadboard configuration file.

When I run the bootloader program, the lights flash pin7, pin8 and then pin9, and the error shows up, but no error light (pin8??) is shown.

What method did you use to disable auto-reset? Capacitor? Resistor? Both?

If you are using the Arduino-1.0 IDE to load the ArduinoISP sketch you will have a problem.

Geta copy of Arduino-0.22 and load the ArduinoISP sketch and then the Arduino board will work just fine.

If you are using AVRDude to transfer a HEX file, the Arduino-0.22 sketch will run at -b 19200, the Arduino-1.0 sketch will run at -b 9600. If you are not running AVRDude directly this won't mean a thing to you.

Hi Coding Badly,

I didn't disable the reset, as per your instruction that a recent Uno wouldn't need it to be disable, which is consistent with what I read online, but I'll try that next w/ a 10k resistor. (Btw I'm using the bare minimum circuitry, trying to use the AVR's on-board 8 MHz clock. Is this not right?)

Hi kf2qd,

Thanks for the thought. I was using 0023, but I'll try 0022 next.

Correction…

wingsofpain:
but I’ll try that next w/ a 10k 120 ohm resistor

…connected between RESET and +5V.

Huh.. OK.. Thanks!

Hi all,

SUCCESS!

I set up the breadboard with the external oscillator, then used 0022 to bootload. Once that worked, I tested with a simple sketch from 1.0, and it worked!

Please let me know if there's anything that might go wrong with that approach, but in the meantime thanks to all!

I'm glad you have it working. Enjoy.

I was using a 10uf cap between reset and grnd. It worked when I programmed a Tiny85 but is the resistor method better?

GoForSmoke: I was using a 10uf cap between reset and grnd. It worked when I programmed a Tiny85 but is the resistor method better?

The best method is one that requires neither the capacitor nor the resistor. For example, I have an Uno R2 with the latest version of optiboot installed that does not require disabling auto-reset.

I have no idea if the capacitor or resistor is better in any way.

Coding Badly is correct. I often use an Uno R3 with optiboot to load bootloaders on breadboard or custom designs, it works quite well and doesnt need modification like the older bootloader needed. Here is a video how to showing burning the bootloader on with an Uno, ArduinoISP and IDE ver 22. Saw a few of these threads and decided to make a short vid to see if it helps anyone. http://youtu.be/_cDmQREpDBI

the latest version of optiboot ... does not require disabling auto-reset.

Is anyone doing this on Mac/linux with bare avrdude and ftdi based "Uno" boards? I know it's supposed to work, but on my Mac I keep getting failures that look like autoreset is still preventing it from working, though it gets surprisingly far (and works OK WITH some form of auto-reset disable):

/Applications/arduino/arduino-1/Arduino-1.app/Contents/Resources/Java/hardware/tools/avr/bin/avrdude -C/Applications/arduino/arduino-1/Arduino-1.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf -patmega168 -carduino -P /dev/tty.usbserial-A20e1eAN -e -b19200 -v -v -v -v

avrdude: Version 5.11, compiled on Sep  2 2011 at 18:52:52
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "/Applications/arduino/arduino-1/Arduino-1.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf"
         User configuration file is "/Users/billw/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/tty.usbserial-A20e1eAN
         Using Programmer              : arduino
         Overriding Baud Rate          : 19200
avrdude: Send: 0 [30]   [20] 
avrdude: Send: 0 [30]   [20] 
avrdude: Send: 0 [30]   [20] 
avrdude: Recv: . [14] 
avrdude: Recv: . [10] 
         AVR Part                      : ATMEGA168
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no        512    4      0  3600  3600 0xff 0xff
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           flash         65     6   128    0 yes     16384  128    128  4500  4500 0xff 0xff
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : Arduino
         Description     : Arduino
avrdude: Send: A [41] . [80]   [20] 
avrdude: Recv: . [14] 
avrdude: Recv: . [10] 
avrdude: Recv: . [14] 

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x14
avrdude: Send: A [41] . [81]   [20] 
avrdude: Recv: . [02] 

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x02
avrdude: Send: A [41] . [82]   [20] 
avrdude: Recv: . [10] 

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x10
avrdude: Send: A [41] . [98]   [20] 
avrdude: Recv: . [14] 
avrdude: Recv: . [01] 
avrdude: Recv: . [10] 
         Hardware Version: -1839945454
         Firmware Version: -1073749736.-1607296304
         Topcard         : STK502
avrdude: Send: A [41] . [84]   [20] 
avrdude: Recv: . [14] 
avrdude: Recv: . [12] 
avrdude: Recv: . [10] 
avrdude: Send: A [41] . [85]   [20] 
avrdude: Recv: . [14] 
avrdude: Recv: . [00] 
avrdude: Recv: . [10] 
avrdude: Send: A [41] . [86]   [20] 
avrdude: Recv: . [14] 
avrdude: Recv: . [00] 
avrdude: Recv: . [10] 
avrdude: Send: A [41] . [87]   [20] 
avrdude: Recv: . [14] 
avrdude: Recv: . [00] 
avrdude: Recv: . [10] 
avrdude: Send: A [41] . [89]   [20] 
avrdude: Recv: . [14] 
avrdude: Recv: . [00] 
avrdude: Recv: . [10] 
         Vtarget         : 1.8 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us

avrdude: Send: A [41] . [81]   [20] 
avrdude: Recv: . [14] 
avrdude: Recv: . [00] 
avrdude: Recv: . [10] 
avrdude: Send: A [41] . [82]   [20] 
avrdude: Recv: . [14] 
avrdude: Recv: . [00] 
avrdude: Recv: . [10] 
avrdude: Send: B [42] . [86] . [00] . [00] . [01] . [01] . [01] . [01] . [03] . [ff] . [ff] . [ff] . [ff] . [00] . [80] . [02] . [00] . [00] . [00] @ [40] . [00]   [20] 
avrdude: Recv: . [14] 
avrdude: Recv: . [01] 
avrdude: stk500_initialize(): (b) protocol error, expect=0x10, resp=0x01
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

avrdude: Send: Q [51]   [20] 
avrdude: Recv: . [10] 
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x10

avrdude done.  Thank you.

The second byte returned…

avrdude: Send: B [42] . [86] . [00] . [00] . [01] . [01] . [01] . [01] . [03] . [ff] . [ff] . [ff] . [ff] . [00] . [80] . [02] . [00] . [00] . [00] @ [40] . [00] [20]
avrdude: Recv: . [14]
avrdude: Recv: . [01]
avrdude: stk500_initialize(): (b) protocol error, expect=0x10, resp=0x01
avrdude: initialization failed, rc=-1

…is simply wrong. It should be 0x10 not 0x01.

It looks to me like ArduinoISP has a bug or the toolset did not build it correctly. If you don’t mind, please try the TinyISP.ino I sent; let me know if you need another copy.