0

I uploaded the ArduinoISP sketch to an Arduino Nano to use it as a programmer for other chips.

It worked successfully to program an ATtiny45, I did the usual wiring between them, and added a 10uF between RST and GND of the Nano. Everything worked.

Now I'd like to program a standalone ATmega328p with the Nano, I did the usual wiring as well (see this tutorial), as well as this 10uF cap.

But it does't work:

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

The reason might be because this 328p comes from an Arduino Uno, probably configured to be ext-clocked by a crystal. Whereas I don't have any crystal here and wanted to clock the 328p with the internal clock.

Question: how can I restore the 328p to factory default / internal clock, if I don't have a crystal?

Or what other reason can this error be?

Edit: a solution is found here: Change the fuses of an Arduino Uno (can an Arduino Uno change its own fuses?)

1

You can temporarily put it in an UNO. Don't connect this UNO via USB, but use jumper wires to connect the ISP pins plus the power pins to the other Arduino that you are using as an ISP programmer. (You could also use the (2x3) ISP header on the UNO if that's more convenient.)

Or, you could use a high voltage programmer.

Or get/desolder a crystal from some junk electronics. Exact frequency doesn't matter that much. I think somewhere between 1 Mhz and 16 Mhz would work.

You can then reset the fuses, so it doesn't need a crystal.

  • Thank you for your answer. I will try to put it on a Uno temporarily just the time of setting clock to internal. How to do this from arduino IDE ? When I select Board: Uno there is no submenu to select clock internal / external. Any idea ? – Basj Sep 20 at 13:59
  • 1
    @Basj sorry about that. I kind of glossed over the fact that you only use the UNO for the crystal, and still need to connect it tho the other Arduino used as ISP programmer. I edited my answer to reflect that. Looking at your edit, it seems like you already figured it out yourself. Which it great. – Gerben Sep 21 at 14:38
0

That error basically says the bootloader you are trying to burn does not appear to be for that device. This could be due to corruption or (more likely in your case) harvesting and reconfiguring the hardware.

If the error does not appear when you try to load the bootloader for the Uno (original device you harvested it from for those harvesting from other configurations), you will know it is the latter.

Either way, you can try to -f it by running avrdude to burn the bootloader via command line (as it says). I've successfully saved stuff with a corrupt bootloader this way although i've never found it worth the hassle to harvest and reconfigure- if you pulled it off the uno, surely you can stitch it to a clock.

If your clock is off by a bit, you may just need to get lucky over several attempts :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.