Go Down

Topic: Using an Arduino as an AVR ISP (Read 25671 times) previous topic - next topic


I have been having some trouble with my Arduino Duemilanove recently. I have been getting the error:

avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

The L led doesn't not blink and my old code is missing. I plan to reinstall the boot loader and I found a how-to guide at the following link:


I followed all the steps at this site and i got the following message:

avrdude: Yikes!  Invalid device signature.
        Double check connections and try again, or use -F to override
        this check.

I have double and triple checked the wiring and still nothing. Anyone know if I should do the -F thing?

also, if the -F method seems best, could you please explain to me what it is trying to get me to do?


From my experience the invalid device signature means the chip isn't recognized correctly and the -f isn't going to help.
Which circuit did you use, the one on the breadboard? Because that could probleblt use a couple of decoupling capacitors.
Also keep your wires short.


No. I used two duemilanove boards. Any suggestions?


I'm exactly in the same situation.  Don't know why, my Duemilanove is working properly, but there is no way to upload new sketches (the L led its like "dimmed" )

I've also tried the Arduino as AVR ISP with Arduino IDE 0018 and ?ve got exactly the same " Double check connections and try again, or use -F to override this check.".

I'll also appreciate any help!

I've use direct breadboard cables to connect both arduinos (wires will be something like 6cm or less)

I haven't tested yet, because I'm using W7 and I guess and going to end up with driver issues,  but I've also seen the "bitbang method" (http://www.geocities.jp/arduino_diecimila/bootloader/index_en.html )  just in case you want to give it a try...


The board that you're using as the AVRISP has to have an ATmega328 on it.  (The bootloader on the ATmega168 doesn't time out on errors, and gets confused by the data coming from the computer.)  Also, once you've uploaded the AVRISP sketch to the Arduino you're using as the ISP, you should change the selection in the board menu to the board you're burning the bootloader onto.


Alright. Both boards are AT mega 328s and are both duimilanove boards, same generation.


The similar problem. Arduino Mega with the avrisp.03 sketch. The command line is

avrdude.exe -p m48 -P com5 -c arduino -b 19200 -t

The response is

avrdude.exe: stk500_program_enable(): protocol error, expect=0x14, resp=0x50
avrdude.exe: initialization failed, rc=-1;
                  Double check connections and try again, or use -F ...
avrdude.exe: stk500_disable(): protocol error, expect=0x14, resp=0x51

I suppose one of the reasons is that I've connected NOTHING to Arduino, no target MCU at all. But the question is as follow: can I check the avrdude + Arduino as avrisp device WITHOUT target MCU? Or, in other words, what can I check if I've got only Arduino (loaded with the sketch)?

And: can I use Arduino Nano as avrisp?



Aug 24, 2010, 10:18 pm Last Edit: Aug 24, 2010, 10:18 pm by Osgeld Reason: 1
-c arduino

try -c avrisp


2 Osgeld:

Thanks a lot! I changed -c arduino to -c avrisp and the DUDE recognized our Arduino :)
Don't understand this magic...

Anyway, "AVR device is initialized and ready to accept instructions"

"Invalid device signature" - because of no connections to a target MCU. It's OK so far...


Don't understand this magic...

-c arduino requests communication through the serial communication line using the bootloader; this was not exactly what you intended :-)


Aug 25, 2010, 05:58 pm Last Edit: Aug 25, 2010, 06:01 pm by kyakzcy Reason: 1
I wouldn't be so sure of it. In AVRDUDE command line description I see, that option

-c programmer-id

have entries:

arduino    Arduino board, protocol similar to STK500 1.x


avrisp      Atmel AVR ISP (an alias for stk500)

Does it mean that AVRDUDE considers -c arduino and -c avrisp in a similar way? I think so

But it is not so important now. As my experiments continue, I've found that AVRDUDE doesn't want to identify my Arduino. I've made a comment here:

of such a nature:

Arduino Mega. Arduino 018 IDE and avrisp.03 sketch. AVRDUDE ver. 5.10.

No sync:

avrdude -p m48 -P com5 -c avrisp -b 9600

stk500_initialize(): programmer not in sync: resp=0x15

Once or twice they have sync. And, as I see from resp 0x15, they do communicate. More of it, this resp is send when Arduino gets '0' command from the AVRDUDE. And fails to find trailing SPACE.

I've tried 120 Ohm resistor. No result. No RESET pulse when AVRDUDE begins it's session, by the way -with or without the resistor.

Can anybody help?

It would be great to monitor the communication between AVRDUDE and Arduino as avrisp. There's something about a log file in

AVR068: STK500 Communication Protocol
(7.3 STK500 Communication Logging)

but I cannot find the right entry in Windows Registry to write LogFilePath...




I've began from this. Then changed to 9600. both in Arduino sketch and in AVRDUDE command line.
Besides, the reported response of Arduino 0x15 shows that communication rate is correct. That code is sent by Arduino as NOSYNC.


Aug 25, 2010, 07:29 pm Last Edit: Aug 25, 2010, 07:32 pm by mpeuser Reason: 1
Does it mean that AVRDUDE considers -c arduino and -c avrisp in a similar way? I think so

No it does not. It was just a misinterpretation from your side. The bootloader uses a modified stk500 protocol...  Never mind!


OK, I've got a serial port monitor and STK500 commands description. Will try to solve the problem. Then I will write down the result

Go Up