Arduino Bootloader on a 328 w/Mega2560

So I recently decided to attempt the Hackduino project found here, and have all the parts already, but I'm having trouble burning the bootloader onto the 328 chip. I have access to two Uno's and a Mega2560, and I've attempted to burn the bootloader on the chip using both.

I also tried following this tutorial for burning using a Mega, to no success.

I have Pin 13->13, 12->12, 11->11, 10->reset, gnd->gnd and +5->+5. I also have a 100nF capacitor between reset and +5v on the Mega.

I've already uploaded the sketch to the Mega, but when I try to burn it, I keep getting errors. The one I get the most is "avrdude: stk500_getsync(): not in sync: resp=0x00" (Just that).

I have Board = Uno, Serial = COM5, Programmer = Arduino as ISP

What can I do?

(deleted)

You mean like this? I tried that multiple times as well, didn't work either.

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

Close but on the Mega it's actually Pin 10, not the Slave Select pin, that connects to the Reset line on the target board.

So I should move the red wire from pin 53 to pin 10 on the Mega?

This is what I get now...

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

Here is the hookup

Mega +5 -> Uno +5 Mega +5 -> 100nF cap -> Mega Reset Mega Gnd -> Uno Gnd

Mega 10 -> Uno Reset

Mega 52 -> Uno 13 Mega 50 -> Uno 12 Mega 51 -> Uno 11

Cyberogue: Mega +5 -> Uno +5 Mega +5 -> 100nF cap -> Mega Reset Mega Gnd -> Uno Gnd Mega 10 -> Uno Reset Mega 52 -> Uno 13 Mega 50 -> Uno 12 Mega 51 -> Uno 11

Is that 100nF capacitor supposed to disable the auto-reset on the Mega? If so that should be a 1 to 10 uF (not nF) capacitor with the + side to Mega Reset and the - side to Mega Ground. Alternatively, people have use a 100 to 120 ohm resistor from Mega Reset to Mega +5.

The other connections look good.

Alright, so I got a chance to try it again...

Mega +5 -> Uno +5 Mega +5 -> 100ohm resistor -> Mega Reset Mega Gnd -> Uno Gnd Mega 10 -> Uno Reset Mega 52 -> Uno 13 Mega 50 -> Uno 12 Mega 51 -> Uno 11

Tools > Board > Uno (After uploading to Mega, burning to an Uno) Tools > Programmer > Arduino as ISP

I have the default ArduinoISP code (found under Sketches) uploaded to the Mega2560

And...

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

What am I doing wrong?

I tried ArduinoISP under Arduino 1.0 and, like many others, I had no luck getting it to work. At least one person (http://code.google.com/p/arduino/issues/detail?id=661) found that increasing the Serial buffer from 64 bytes to 128 bytes fixed it. Another in the same thread mentioned that lowering the baud rate to 9600 worked as well. It seems that the lack of flow control combined with a high baud rate and small Serial buffer cause a buffer overflow (characters get lost).

Not sure how to change the buffer, but I changed the Baud to 9600, and got this...

avrdude: stk500_getsync(): not in sync: resp=0x00

I'm currently moving the 328 to a breadboard with a crystal, and I'll post the results soon.

-edit-

When I try to burn to it using just a breadboard, I get this:

avrdude: stk500_getsync(): not in sync: resp=0x00

I have a 100ohm resistor between mega reset and +5v, and the pins are remapped to use the Mega's pin setup from above.The LED's are heartbeat-error-program (from bottom to top/left to right), and the yellow is just power.

Using the "Duemilanove w/328" board setting, Arduino as ISP, and 9600 Baud

And when I try it with an Arduino Uno, using the same code (9600 Baud, and pins 13-11 instead of 50-52)

avrdude: stk500_getsync(): not in sync: resp=0x00