Burning bootloader on an ATmega168PA-AU without external oscillator

Hi, I'm using an ATmega168PA-AU on a custom board without an external oscillator. I want to burn the Arduino bootloader to the microcontroller. I'm using an Arduino Duemilanove (ATmega328p) as ISP. I connected the SPI and RESET pins, but I'm getting

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

I tried to burn the bootloader to an ATmega328p on a minimal breadboard (no external oscillator) and it worked, so I think it has something to do with the ATmega168PA.

Any tips?

Thanks.

The ATmega168P(A) is the same family as the ATmega328P, so it should work. Do you have a decoupling capacitor of 100nF to 5V and GND ? Do you have a crystal or osciallator, perhaps the ATmega chip is accidently set for external crystal. I have a crystal plus two 22pF capacitors on my "programmer board" just in case.

I think Nick Gammon has a ISP sketch that also supplies a clock signal, in case the fuses are set for external crystal.

Under, Tools/Board what do you have selected?

Nicks sketch does supply a clock from D9. See: Alternate clock source http://www.gammon.com.au/forum/?id=11637

Peter_n: The ATmega168P(A) is the same family as the ATmega328P, so it should work. Do you have a decoupling capacitor of 100nF to 5V and GND ? Do you have a crystal or osciallator, perhaps the ATmega chip is accidently set for external crystal. I have a crystal plus two 22pF capacitors on my "programmer board" just in case.

I think Nick Gammon has a ISP sketch that also supplies a clock signal, in case the fuses are set for external crystal.

Yes, I have a decoupling capacitor between 5V and GND.

LarryD: Under, Tools/Board what do you have selected?

Nicks sketch does supply a clock from D9. See: Alternate clock source http://www.gammon.com.au/forum/?id=11637

I have "ATmega328 on a breadboard (8MHz internal clock)". I'll try the alternate clock source.

Thanks.