I am trying to flash the firmware on an atmega328pb controller, which should be identical to an atmega328p when it comes to fuse bytes and electrical connections. I have developed a PCB - I have followed the Grids schematic as a guide on how to layout a bare metal atmega328 - otherwise, the module is different (in hardware and functionality). I just bricked my second processor, perhaps it’s time to ask for help.
Right now the only components on board are the uC, crystal and associated capacitors, bypass capacitors and reset pull up resistor. I connect to the board using a usbtiny programmer through the SPI interface.
When the ICs are fresh, I can actually read their ID just fine, write fuses etc. After looking around and reading up on it, I thought that setting the low fuse byte to 0xFF would enable the crystal oscillator (20Mhz, same as the grids one), disable the clock output and the internal prescaler. Instead, my uC is bricked and stopped responding to programming or read calls, with an error “ERROR: Unknown signature 2a0000” when I try to read the fuses.
At first, I tried the steps recommended here, https://shepherdingelectrons.blogspot.com/2016/03/recovering-atmega328p-chip-from.html and that actually worked. I could revert my chip back to the factory default 1Mhz, and reflash it, although I couldn’t make the external crystal work at all (consecutively bricking it again with each failed try). When probing with the oscilloscope I see no activity on XTAL1 or XTAL2, regardless of the fuse settings I tried.
Eventually, using an external arduino clock at 1Mhz stopped working to revive the board, even though I didn’t change anything. When I probe the arduino clock, it is indeed working at 1Mhz as it should. The last fuse I wrote was lfuse = 0xFF.
The message I’m getting when trying to read the fuses is (I’m using the -F designator)
avrdude.exe: initialization failed, rc=-1
avrdude.exe: AVR device initialized and ready to accept instructions
avrdude.exe: Device signature = 0x340000
avrdude.exe: Expected signature for ATmega328PB is 1E 95 16
avrdude.exe: error: usbtiny_transmit:
avrdude.exe done. Thank you.
I’m not sure what else to try? I have verified the connections on board, cleaned the flux etc. I have one last chip I could try if there’s no coming back for those two, but there has to be something that I can still do?