Arduino as ISP (bootloader)

Trying to program the bootloader onto a Atmega168 on a breadboard with a Duemilanove using this layout

But keep getting this error message.

 avrdude: stk500_program_enable(): protocol error, expect=0x14, resp=0x50
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=0x51

Which version of the Arduino software are you using? Some are known to have broken ArduinoISP setup.

Is the 328 in the Duemilanova one with a Duemilanova bootloader?

How did you install ArduinoISP onto that chip exactly? What board setting did you use, did it really succeed without error?

Which board do you have selected when you try programming the bootloader onto the 168?

Have you really forgotten decoupling capacitors on the 168? No chip can be expected to work reliably without them.

MarkT: Which version of the Arduino software are you using? Some are known to have broken ArduinoISP setup.

1.0.5

MarkT: Is the 328 in the Duemilanove one with a Duemilanove bootloader?

It is a 168 in both in the Duemilanove and on the breadboard, but the one in the Duemilanove has the bootloader and the ArduinoISP sketch loaded on it.

MarkT: How did you install ArduinoISP onto that chip exactly?

Same as loading any sketch, plugged my Duemilanove in via USB selected the board type and com port in the IDE and uploaded the sketch to the board.

MarkT: What board setting did you use, did it really succeed without error?

Yes, had "Arduino Diecimila or Duemilanove w/ ATmega168" selected, and had no errors and am able to upload blink etc with no problem.

MarkT: Which board do you have selected when you try programming the bootloader onto the 168?

The same "Arduino Diecimila or Duemilanove w/ ATmega168"

MarkT: Have you really forgotten decoupling capacitors on the 168? No chip can be expected to work reliably without them.

No, have a pair of 22pF caps on the breadboard, as per the diagram.

=(

Perhaps you could take a good quality picture, or two, of your setup and post that. [u]All[/u] of the connections should be in the pic (nothing going out of shot, etc)

Hi n00b, The 22pF caps are not decoupling caps! You want something like 10-100uF across the power supply to keep it steady, also a 0.1uF or 2 will help with any electrical noise.

Hope it helps. Regards

Mel.

Cactusface: Hi n00b, The 22pF caps are not decoupling caps! You want something like 10-100uF across the power supply to keep it steady, also a 0.1uF or 2 will help with any electrical noise.

Hope it helps. Regards

Mel.

Thanks Mel mate,

I will give that a try when I get home.

Just out of interest, why would this been needed if power is coming from the arduino that already has a couple of caps on the regulator? (in no way questioning you, just interested in learning! :) )

Thanks Mel mate,

I will give that a try when I get home.

Just out of interest, why would this been needed if power is coming from the arduino that already has a couple of caps on the regulator? (in no way questioning you, just interested in learning! smiley )

Hi, The long? connecting wires can pick stuff up! just like an aerial!! be sure to put one of the 0.1uF's as close to the Chip's power conections as you can.

:blush: of course, that makes sense!

Will put a couple of 0.1uf caps on the chips power pins.

Thank you!