Fixing device signature = 0x000000

From my blog: GorillaRobotics: Fixing device signature = 0x000000

Summary:

More folks read the arduino forums than my blog, and I struggled with this for a while, so others may be interested in it.

Burning a bootloader to some Atmega 644's (for a Sanguino PCB I designed) kept failing with the error, "device signature = 0x000000".

Use AVRDUDE with "-B 8" to write the arduino bootloader of your choice. Then use arduino to do it again.

Details:

I couldn't write a bootloader to a bunch of atmega 644's from the arduino ide. Indeed, even trying to do anything using avrdude resulted in the message:

avrdude: Device signature = 0x000000
avrdude: Expected signature for ATMEGA644 is 1E 96 09
Double check chip, or use -F to override this check.

Turns out that AVR ships many chips with a slow clock speed. So avrdude has to be told to chill out a bit ;->Which can be done by using "-B DELAY" to slow avrdude's clock speed. One of my chips respond with DELAY set to 4. Another 6. Others may require even larger settings. We'll see.

Burning a bootloader using avrdude with "-B 6" seems to change the clock speed on the chip, so that "-B DELAY" is no longer needed, so that bootloaders can now be written from the arduino IDE. But the bootloader loaded using avrdude doesn't seem to interact with the arduino IDE correctly. So, go to the arduino IDE, and burn the bootloader again.

Now all should be well, and you should be able to download sketches to the chip over the serial line.

Clearly, what's happened is downloading using avrdude set the chips clock bits, but did not use the right flags to download the bootloader correctly. With the clock running quickly enough, the arduino IDE uses the correct avrdude options to download the bootloader. I could figure out the right flags and do it in one shot. And probably will. But for now, this is good enough to make my chips useful.

Thanks for posting this.

You sometimes also see the opposite, where burning the bootloader is too slow. That's because AVRISP mkII ship with basically random speed settings.