Need help burning bootloader to breadboard ATmega328P using Arduino Micro as ISP

HI! I am trying to migrate my project from my Micro to a breadboard 328P, but having trouble burning the bootloader. With guidance from several tutorials, I have connected the MOSI, SCK, and MISO pins to the ICSP header; TX and RX to the required digital pins, and RESET to pin 10 on the Micro-- in addition to the LEDs described in the ArduinoISP sketch.

I uploaded the sketch to the Micro and then selected "Tools=>Board=>Arduino Duemilinove w/ ATmega328" and "Tools=>Programmer=>Arduino as ISP".

With this setup, I try to burn the bootloader to the breadoard AVR but get the following error:

Error while burning bootloader.

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

What steps do I need to take in order to fix this?

well, do you mind citing links for the tutorials that you are looking at.

The method that you are trying(as what I understand at least) does not require TX and RX. You are going to upload a boot loader not already having one.

So you need to do right connections. These are the pins. Check pins on the controller unit(depends on program which pin is used as Select) but on the target these are the ones : MISO, MOSI, SCK, VCC, GND, RESET

saurabhshandilya: well, do you mind citing links for the tutorials that you are looking at.

The method that you are trying(as what I understand at least) does not require TX and RX. You are going to upload a boot loader not already having one.

So you need to do right connections. These are the pins. Check pins on the controller unit(depends on program which pin is used as Select) but on the target these are the ones : MISO, MOSI, SCK, VCC, GND, RESET

I am using the following: http://www.instructables.com/id/Arduino-Leonardo-as-Isp/step5/Target-Atmel-Microcontroller-1-Atmega328p-burning-/ http://arduino.cc/en/Tutorial/ArduinoToBreadboard

but I have to feel my way around both as I couldn't find one that was for the Micro, let alone one that was well-documented. Using all of the connections on the ICSP header now (and none of the others), I still get the same error.

Also, I may have connected the pins incorrectly several times... hopefully that didn't damage anything, although the header seems to supply very little current.

I am able to bootload AVR 1284 chips using Nick Gammon's software and an UNO.

http://www.gammon.com.au/forum/?id=11637

Use Nick Gammon's bootload installer sketch instead:

http://www.gammon.com.au/forum/?id=11635

CrossRoads:
Use Nick Gammon’s bootload installer sketch instead:

Gammon Forum : Electronics : Microprocessors : Atmega bootloader programmer

It looks like it is what I need… but when I tried it, the compile was too big:

Binary sketch size: 30,096 bytes (of a 28,672 byte maximum)
processing.app.debug.RunnerException: Sketch too big; see http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing it.
	at processing.app.Sketch.size(Sketch.java:1658)
	at processing.app.Sketch.build(Sketch.java:1591)
	at processing.app.Sketch.exportApplet(Sketch.java:1613)
	at processing.app.Sketch.exportApplet(Sketch.java:1599)
	at processing.app.Editor$DefaultExportHandler.run(Editor.java:2380)
	at java.lang.Thread.run(Thread.java:744)

How would I go about this problem?

Ok, I removed the lilypad hex and commented it out several times in the program so it now compiles and runs, but the serial monitor gets stuck here:

Atmega chip programmer.
Written by Nick Gammon.
Version 1.26
Compiled on Nov 24 2014 at 21:22:43
Attempting to enter programming mode ...

I found some errors in my wiring and, according to the program, successfully burned the bootloader! Thanks, guys for your help!

legowave440,

It looks like it is what I need... but when I tried it, the compile was too big:

Ok, I removed the lilypad hex and commented it out several times in the program so it now compiles and runs, but the serial monitor gets stuck here:

I had no trouble compiling it for an UNO and running it.

CrossRoads: Use Nick Gammon's bootload installer sketch instead:

http://www.gammon.com.au/forum/?id=11635

The minimal breadboard page does use the chip programmer sketch after the detector is run. By the time it gets to loading, they cross the same bridge. I just checked. What I have and used is both detector and programmer in a very cookbook way so my bad only remembering the one name.

And what Nick's sketch covers that the IDE loader doesn't, I think is:

This sketch was inspired by the Optiloader sketch written for the Arduino. However it is a total rewrite, in order to accomodate the Mega2560 board, which the original one did not handle, due to the larger address space.

GoForSmoke: legowave440, I had no trouble compiling it for an UNO and running it.

From what I found, the Leonardo/Micro builds took more space than the UNO builds, plus the lack of external USB made the entire sketch too big,

Interesting, but ouch!

legowave440:
It looks like it is what I need… but when I tried it, the compile was too big:

I’ve uploaded a new version that allows you to easily omit certain bootloaders to save program size:

Look for these lines:

#define USE_ATMEGA8 true
#define USE_ATMEGA16U2 true    // Uno USB interface chip
#define USE_ATMEGA32U4 true    // Leonardo
#define USE_ATMEGA168 true
#define USE_ATMEGA1280 true
#define USE_ATMEGA1284 true
#define USE_ATMEGA2560 true

By changing “true” to “false” that bootloader is not included. You can achieve substantial program size reductions by omitting some of them (eg. the Mega2560).

(The commit also gets rid of some trailing spaces, which is why it looks a bit more complex than it really is).

Thanks! Next time I need to burn a bootloader, I know where to go!

If Arduino ISP hacks are not working, there is still hope ! And it is called optiLoader You can try this Optiloader it works as a breeze.