328p programming "Yikes! Invalid device signature."

Hey all

I have made a custom board, but I have lost the connection and can no longer program it.

Its a "atmega328p" chip and I use an arduino for programming (arduino as isp)

It has worked fine until I accidentally uploaded #define F_CPU 240000000UL to the chip and now I can no longer talk to board

I have tried to erase the chip with cmd "avrdude -c arduino -b 19200 -p m328p -P COM5 -e"

and: "avrdude -c arduino -b 19200 -p m328p -P COM5 -e -F"

Someone who knows what I can do to make my board work again?

It tries to read the chip ID, and it only got 0x000000. That means that your signals are not working.
Can you give a schematic and a photo ?

  • The AREF should not be connected to VCC.
  • Are there enough decoupling capacitors ?
  • Are all the VCC and all the GND pins connected ?
  • Is the crystal/resonator with 22pF very close to the chip ?
  • There should be no capacitor between /RESET and GND.
  • Did you do something with the fuses ? Perhaps it is bricked.

Koepel:
It tries to read the chip ID, and it only got 0x000000. That means that your signals are not working.
Can you give a schematic and a photo ?

  • The AREF should not be connected to VCC.
  • Are there enough decoupling capacitors ?
  • Are all the VCC and all the GND pins connected ?
  • Is the crystal/resonator with 22pF very close to the chip ?
  • There should be no capacitor between /RESET and GND.
  • Did you do something with the fuses ? Perhaps it is bricked.

I have several boards that work so something is right.

It's only on one board where I messed with the clock

The AREF are connected to VCC, why should it not?
The crystal is very close to the chip, but right now i am using the on board crystal.
I just uploaded a simple sketch, so I do not think anything has changed in the fuse registers. Can you get it out of the so-called "bricked"?

easyanton:
I have several boards that work so something is right.

I’m sorry, but that is not good enough for us :wink: We want to see for ourselves if it is okay.

easyanton:
It’s only on one board where I messed with the clock

Is that the board that is not working ? It needs a clock. You can apply it with another Arduino board if you accidentally set the clock to external and there is not crystal/resonator connected to those pins.

easyanton:
The AREF are connected to VCC, why should it not?

Because that is a bad mistake. Don’t do that. There will be a shortcut when you select a internal reference voltage.

easyanton:
I just uploaded a simple sketch, so I do not think anything has changed in the fuse registers. Can you get it out of the so-called “bricked”?

Does the simple sketch work ? Can you blink a led ?
Some fuses brick it more than others. There is always the High Voltage programming mode (via the /RESET pin) to unbrick it.

Koepel:
I'm sorry, but that is not good enough for us :wink: We want to see for ourselves if it is okay.
Is that the board that is not working ? It needs a clock. You can apply it with another Arduino board if you accidentally set the clock to external and there is not crystal/resonator connected to those pins.
Because that is a bad mistake. Don't do that. There will be a shortcut when you select a internal reference voltage.
Does the simple sketch work ? Can you blink a led ?
Some fuses brick it more than others. There is always the High Voltage programming mode (via the /RESET pin) to unbrick it.

Yes I can flash an LED on the other boards.

I have ordered a Usbasp, but it will be a long time before I have it, so I cannot use High Voltage right now

You don't have to quote everything I wrote. What I wrote is already there :wink:
I use only the "Quote" to specifically comment on that part.

Don't connect AREF to VCC.
Just one decoupling capacitor is very minimal. It depens on the voltage regulator and the current that the pins should give if that is enough.

USBasp is not HV (High Voltage) programming.
I don't know if you need HV programming. Perhaps your ATmega328P is broken.

Nick Gammon writes about "alternate clock source": https://www.gammon.com.au/bootloader
When for example the external crystal is broken.

Can you replace the crystal/resonator ?
Can you de-solder the ATmega328P and replace it with another one ?
There is not much else I can tell. Something is wrong. Discard it and move on.

You have likely managed to kill the 328 chip. Just replace it.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.