Trying to install bootloader and getting protocol error. What to do?

Here's what I get when I try to install the bootloader:

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x14

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x01
avrdude: stk500_initialize(): (a) protocol error, expect=0x14, resp=0x10
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

avrdude: stk500_disable(): unknown response=0x12

I've checked the pins (and verified via continuity from point to point with an ohmeter) and it's wired just like the diagram and with no solder bridges. I installed the ArdiunoISP Sketch on the Arduino Uno onto a known good Atmega 328 chip, then Tools >Programer> Arduino as ISP, then clicked "Install Bootloader". The error you see above is what I get. What can I do?

Moderator edit:
</mark> <mark>[code]</mark> <mark>

</mark> <mark>[/code]</mark> <mark>
tags added.

Post the verbose output.

Post verbose output. Check wiring, too, specifically the reset line on the target (with verbose output I could recognize if this was it, or if using a usbasp, where it's unmistakable) - burn bootloader is done in two steps, and if reset doesn't go high between them, the second half fails

Also make sure you have disabled autoreset on the programmer ( the one with arduino isp on it) with a cap from its reset to ground. That will often cause protocol errors.

Thanks! I tried it with Arduino as ISP and with AVR ISP settings to see if that made a difference.
Here is the verbose:

/usr/share/arduino/hardware/tools/avrdude -C/usr/share/arduino/hardware/tools/avrdude.conf -v -v -v -v -patmega328p -cstk500v1 -P/dev/ttyUSB0 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0x05:m -Uhfuse:w:0xDA:m -Ulfuse:w:0xFF:m 

avrdude: Version 6.0.1, compiled on Oct 21 2013 at 15:55:32
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "/usr/share/arduino/hardware/tools/avrdude.conf"
         User configuration file is "/home/nick/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/ttyUSB0
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
avrdude: Send: 0 [30]   [20] 
avrdude: Send: 0 [30]   [20] 
avrdude: Send: 0 [30]   [20] 
avrdude: Recv: . [15] 
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x15
avrdude: Send: 0 [30]   [20] 
avrdude: Recv: . [15] 
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x15
avrdude: Send: 0 [30]   [20] 
avrdude: Recv: . [14] 
avrdude: Recv: . [10] 
         AVR Part                      : ATmega328P
         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       1024    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     32768  128    256  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 : STK500
         Description     : Atmel STK500 Version 1.x firmware
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: 4240346
         Firmware Version: 6714016.0
         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] . [04] . [00] . [00] . [00] . [80] . [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.

Moderator edit:
</mark> <mark>[code]</mark> <mark>

</mark> <mark>[/code]</mark> <mark>
tags added.

Just tried it again with a 4.7uF cap across reset and ground on the board with the Arduino ISP uploaded to it and had a better result. The LED's lit up like a Christmas tree and it said done burning bootloader. Unfortunately I still can't load a program onto the chip. I will this time say I used a Nano as the Adruino ISP to load an UNO. I don't know if that'll make a difference.

Try Nick Gammon's bootload installer sketch instead:

or

777funk:
I still can't load a program onto the chip.

By "can't load" I assume you mean through the bootloader.

Does "the chip" have the external parts for the clock (crystal + capacitors)?

Does "the chip" have the external parts for the auto-reset circuit?

777funk:
Just tried it again with a 4.7uF cap across reset and ground on the board with the Arduino ISP uploaded to it and had a better result. The LED's lit up like a Christmas tree and it said done burning bootloader. Unfortunately I still can't load a program onto the chip. I will this time say I used a Nano as the Adruino ISP to load an UNO. I don't know if that'll make a difference.

The problem was that I had Nano selected as the board to write to. I needed the UNO since that was the final destination for the bootloader (and the board the freshly bootloaded chip would be programmed in).

Works great now!

indeed, I succeeded with a capacitor 470uF/25V between RST and GND on the ISP programmer !!!!!!!
thanks for the share !

Similar problem, need clarification and understanding.
operating system: Debian linux, tried both Buster and Jessie
boards: using new UNO as programmer, UNO R3 with new (bare) ATMEGA328P-PU chip from DigiKey as target.
setup: exactly as in https://www.arduino.cc/en/Tutorial/ArduinoISP is my goal, rechecked many times.
problem: try to install bootloader and receiving multiple protocol errors. My verbose error message is almost identical to the original poster except Arduino 1.8.9 and avrdude Version 6.3-20171130, and I have no lines of send and receive. Errors, expect, and resp values are all identical. I can send my verbose output if it would help, but might as well save bandwidth.

From the above, it looks like a capacitor across reset to gnd on the programmer board should allow me to burn a bootloader, but I'm confused.

  1. 4.7 uF or 470 uF?
  2. Is this for sure on the programmer board?
  3. Why does this work? What does it do?

If I can understand the why, then I may learn something about the hardware that will help me in the future. At the moment, I'm a greenhorn trying to get started by reviving a board (the target) that my grandson fried playing around with 12V. I'm assuming, perhaps incorrectly, that the problem was in the chip. The target board shows a solid power-on LED and solid pin-13 LED when connected to the programmer.

RockyShore:
I can send my verbose output if it would help...

Did you not notice the first reply?

(Please use code tags.)

Here is my error:

Arduino: 1.8.9 (Linux), Board: "Arduino/Genuino Uno"

/home/ron/ComputerDocs/hardware/arduino/arduino-1.8.9/hardware/tools/avr/bin/avrdude -C/home/ron/ComputerDocs/hardware/arduino/arduino-1.8.9/hardware/tools/avr/etc/avrdude.conf -v -patmega328p -carduino -P/dev/ttyACM0 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0xFD:m -Uhfuse:w:0xDE:m -Ulfuse:w:0xFF:m 

avrdude: Version 6.3-20171130
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/home/ron/ComputerDocs/hardware/arduino/arduino-1.8.9/hardware/tools/avr/etc/avrdude.conf"
         User configuration file is "/home/ron/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/ttyACM0
         Using Programmer              : arduino
         Overriding Baud Rate          : 19200
         AVR Part                      : ATmega328P
         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       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : Arduino
         Description     : Arduino

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x14

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x02

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x10
         Hardware Version: 135059872
         Firmware Version: 0.134885523
         Topcard         : STK502
         Vtarget         : 1.8 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us

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: stk500_disable(): protocol error, expect=0x14, resp=0x10

avrdude done.  Thank you.

Error while burning bootloader.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Digging around some more, and reading with better understanding, I think I have solved my problem without being able to check it until I buy a capacitor.

The arduinoISP tutorial says:

  1. The capacitor is 10 uF.
  2. Yes, it is clearly shown on the programmer board (MEGA) but not on the circuit diagram for the UNO programmer application.
  3. The capacitor functions to disable the autoreset function of the board and is associated with boards that have an interface between the microcontroller and the computer's USB. Beyond that, I'm still in the dark.

The tutorial applies this additional circuit component to a UNO programmer in the paragraph under the MEGA diagram.

Thanks, forum members, for standing by ready to help, and for the encouragement to not give up but keep searching the resources available. Perhaps we beginners would be helped by including the capacitor in the UNO as programmer circuit drawing in the tutorial.

Ron

Yes it would be better if the tutorial was improved.

The capacitor can be any value that is big enough to absorb the reset pulse that comes from the little 0.1uF capacitor that is between the usb-to-serial chip's DTR pin and the ATmega328P's reset pin. A 4.7uF may be enough, the general recommendation is 10uF or bigger. I use whatever I have handy, sometimes a 33uF one. Another way is to cut the Reset-EN jumper pad trace on the programmer UNO with an x-acto knife (carefully). That will disable auto reset at the beginning of sketch upload.

The idea of disabling reset is you only need to reset the Arduino that you are trying to program. When you are using the Arduino as ISP sketch that you have uploaded to the programmer UNO, you don't need to reset it any more. You need to use to to receive instructions from the computer that guide the programmer UNO to make changes to the target UNO.

If you cut the Reset-EN jumper pad trace, that semi-permanently disables the auto reset. So if you want to upload more sketches on that UNO to replace the Arduino as ISP sketch, you'll need to:

  • tap the reset button manually at just the right time during the compilation and upload process, or
  • use a solder bridge (small blob of solder) melted across the jumper pad to re-enable the auto reset, or
  • install a surface mount switch or jumper pins on the pads, and then close the switch or install a jumper on the pins.