External ATmega328p-pu stopped working

I have a ATmega328p-pu. I programmed it using the Minimal Circuit of this tutorial.

http://arduino.cc/en/Tutorial/ArduinoToBreadboard

I burned the boatloader on the microcontroler. I uploaded a couple of sketches using the way of uploading the bootloader(because i have a arduino uno smd). First worked fine but then....it stopped working i got this error:

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

I double checked the connections. Nothing wrong. I looked on forums but couldn't find it. I tried to find out how to use that -F thing. But couldn't find that as wel.

Can anyboady tell me how to solve this problem? Is there any way I can find out if the chip is damaged? Or can i maybe reset it to factory settings Or erase the eeprom memory?

plz help

avrdude: Device signature = 0x000000

That could mean a bad connection in MISO or SCK or Reset or it might mean the crystal oscillator isn't working.

I am not using any. I just have the chip on a breadboard an the wires connected.

If the chip has previously been burned with a regular Arduino bootloader it will need a crystal to be re-programmed. The chip can't parse the serial programming commands without a working system clock.

There is a version of ArduinoISP from adafruit that generates an 8MHz clock on Pin 9. You can connect Pin 9 to the XTL1 pin of the target ATmega to give it a working system clock even without a crystal. https://github.com/adafruit/ArduinoISP

Thanks for that one it worked pritty well. I can upload again. But if i use the blink sketch en change the first delay to 3000 then it stays 5 sec on instead of 3 sec. If I upload the hello world lcd sketch then it dusn't display anything. Is that because of the clock? Will it work normaly again if I buy a uno rev 3 and put the chip in the ic socket?

my configuration file:

atmega328bb.name=ATmega328 on a breadboard

atmega328bb.upload.using=arduino:arduinoisp atmega328bb.upload.maximum_size=32256 atmega328bb.upload.speed=115200

atmega328bb.bootloader.low_fuses=0xff atmega328bb.bootloader.high_fuses=0xde atmega328bb.bootloader.extended_fuses=0x05 atmega328bb.bootloader.path=optiboot atmega328bb.bootloader.file=optiboot_atmega328.hex atmega328bb.bootloader.unlock_bits=0x3F atmega328bb.bootloader.lock_bits=0x0F

atmega328bb.build.mcu=atmega328p atmega328bb.build.f_cpu=16000000L atmega328bb.build.core=arduino:arduino atmega328bb.build.variant=standard

or do I maybe have to change anything of that?

It dus work again. I changed a couple of things in the boards.txt back to normal and rechecked the wiring and saw that I wired the whole lcd the wrong way.

Thanks for all your help.

As you must have figured out, the internal RC clock is 8 MHz so when you set F_CPU to 16000000 everything runs at half speed.