Burn normal bootloader onto Atmega328P configured to use internal 8MHz clock I have an Atmega328P that I have previously burned with a bootloader configured to use the 8MHz internal clock as described here. I would like to now burn the normal Duemilanove bootloader configured to use an external 16MHz clock onto the chip. However, when I try following the normal procedure, it says "Invalid device signature". I can still upload programs to the chip and they will run, but I would like it to use the 16MHz external clock. How do I do this?
I have a sketch that will upload the Optiboot bootloader - that will work perfectly well on the Duemilanove.

The latest version will be available on GitHub.

This particular sketch is in the "Atmega_Board_Programmer" subdirectory.

You need to run this sketch on another Arduino (like a Uno) and connect it up like this: