Burning Bootloader to custom Board Atmega32u4

This is my board the lines going to nothing are the pins used for the aplication.

The problem is that when trying to burn the bootloader to the board (I'm doing it with a Mega following this tutorial Fixing a FAKE Teensy with an Arduino Uno! (Bootloader flash) - YouTube).

I get the error:

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x000000 (retrying)

Error quemando bootloader
Reading | ################################################## | 100% 0.01s

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

avrdude done. Thank you.

"Device Signature = 000000" usually means a bad connection to your target processor. Did you remember to connect to the SPI pins on the MEGA: 51, 50, 52 (not 11, 12, 13 like on the UNO)?

2 Likes

Yep Its connect right

I don't see a pull-up on your Reset pin.

1 Like

Now its says:

avrdude: AVR device initialized and ready to accept instructions

Error burning bootloader
Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x00ff00
avrdude: Expected signature for ATmega32U4 is 1E 95 87
Double check chip, or use -F to override this check

Is there any chance you could share some photos of your setup ?
Board layout also helps.


The layaout shows a Uno board but i didnt find a Mega. Also the pull-up is missing

That is even more strange than usual. Usually if there is a problem the MISO line will be LOW (000000) or HIGH (FFFFFF).

Still tends to indicate a wiring error or a problem with the target processor's clock.

In your picture, I don't see a wire from Pin 10 on the Arduino MEGA to Reset on the target processor. The "Examples->11.ArduinoISP->ArduinoISP" sketch uses Pin 10 for Reset, not the hardware 'SS' pin.

1 Like

FYI, the crystal and coupling caps should really be soldered to the green board you're using. The jumper wires connecting the green board and breadboard are not good enough. At the moment they are not even being used because the factory setting of 32u4 uses the internal RC oscillator. If you manage to burn the bootloader once and then can't connect to it, it would likely be the crystal connection. Once you burn the bootloader, you burn the fuses to tell 32u4 to start using that crystal.

I understand why so many wires. You're using the bus lines on the breadboard to connect to 5V and GND. But for your own sake you may want to just solder all 5V pins on the green boards together, on the green board, then all gnd on the green board together. Then only one 5V and one GND comes out of the green board and into respective headers of MEGA. I suggest you to solder the crystal and caps as well as the pullup resistor. The less mess, the easier to find wiring errors. Try not to chain jumper wires to make them longer. These jumper wires are probably as poor quality as mine so any of them may have bad crimping on their ends. So the less you use them the better off you are.