0x0000000 invalid device signature

I know this kind of question is very common on this forum but I simply don't know what to do.

So long story short: I was programming an ATMEGA644PA with an Arduino (as ISP). I successfully uploaded some blink sketches before, but when I tried to upload the Button sketch it suddenly said that the device signature was 0x00000000. Which is weird, because I successfully uploaded BlinkWithoutDelay 3 minutes ago. No changes to the wiring. I tested a different ATMEGA644PA: worked fine.

So what happened to my AVR chip? Can I revive it?

I saw some solutions (High Voltage Programmer, etc, etc) but they are too complex for a noob like me or I don't have the components to build a solution (in the case of the HVPP).

So? Any suggestions

Kind regards.

Do you have a crystal attached to your ATmega644PA, or are you using the internal oscillator?

I tried both an external 16MHz crystal and the internal 8MHz and 1 MHz crystal. During programming, an external 16MHz crystal was used.