Am I bricking my ATmega328p?


I've been programming some SMD Atmega328p with an UNO using the Arduino as ISP and MiniCore.

Programming usually goes off without a hitch, but occasionally a chip seemingly gets bricked and I'll get the Device signature = 0x000000 error even though I haven't touched the wiring except for 3.3V and GND.

I did notice I forgot to plug in 3.3V and only had the GND connected during one upload. The Arduino IDE was showing it writing and reading anyways then an error occured after. After that all I'm getting is the device signature error on that board, can't even burn a new bootloader on it.

Maybe this is the cause of the random failures? Is there a way to bring this controller back to life?

Any insight would be appreciated!

ATmega should be always programmable with parallel programming method, if it is not damaged. You can use Arduino as parallel programmer. Google!

Hard to say if it is bricked. Post some HW specifications. Frequent problem with bricked ATmega is when the settings is for external clock and there is no clock signal, e.g. external crystal is not present or bad. In such case it is enough to connect square signal to XTAL1 pin. There is ArduinoISP sketch with square signal on pin 9 - google for it.

Thanks for the response,

I have the ATmega pins going to pads on my PCB that are used to jump leads onto an UNO with it set as "Arduino as ISP".

So you're suggesting not programming with that method?

There is an 8Mhz external crystal on the PCB, I can't think of any reason of why it would go bad.

The last board that went bad I was able to program at least a dozen times, but when I forgot to connect VCC during an upload it displayed an error after the console was showing it writing and reading. I was unable to upload or burn a bootloader on the chip after that.

How was the UNO uploading to my board without it being powered? Should I still try connecting a square wave to revive it?

So you're suggesting not programming with that method?

I'm not writing that. ISP method is good and pretty reliable. Just saying that parallel programming should be functional even the chip is bricked.

Arduino as ISP is also reliable. Personally, I never had a problem with this. If something went wrong for me, it always was my mistake. The only disadvantage of Arduino as ISP is that it is slow and uploading something bigger is painfully long process.

There is an 8Mhz external crystal on the PCB, I can't think of any reason of why it would go bad.

I have no idea. Maybe you have loose wires from UNO or something. As I understand, you have your own design. Some PCBs work but some not. Make sure they are soldered properly. Post the photo of not working board.

Not sure what clock speed you are using , but the chip is not rated for running at 3.3v at higher clock frequencies. Not a problem in your case , I guess.

Are your other connections also at 3.3v ?

Issue related to running at 8Mhz , fuses ?

I had some problems when trying to program a 328PB. The bootloader for an internal 8MHz clock installed just fine nut then sketches would not upload.

After lots of messing around, the chip was swapped and it all worked as should, even though I used the same techniques. Not sure if it was my fault or a duff chip. I even used a USBasp with the jumper for slow upload but nope.

My technique is now to upload the bootloader via a USBasp and then upload sketches using so,e sort of FTDI module. Not had any issues since.

Thanks for the help everyone.

I’ve decided to just buy a dedicated programmer instead of using the UNO, It could be that the jumpers just don’t make good enough consistent contact on the UNO.

In case anyone else has this problem I have finally figured out my troubles.

I was using an UNO to program an ATmega328 via ISP running on 3.3V with an 8Mhz external clock.

The Absolute Maximum voltage on any pin except RESET is Vcc + 0.5V.

Not sure how I missed this for so long lol