Arduino 1.8.18 cannot talk to board with ATMEGA328-PU

In the (deep) past I was able to get the "-PU" working in the IDE by hacking the avrdude.conf file and changing the signature from 0x1E 0x95 0x0F to 0x1E 0x95 0x14, restarting the IDE and uploading via a debugger.

Recently, I needed to upgrade the firmware for an old board and updated the IDE to 1.8.18. The hacks I've used don't seem to work anymore.

I get the dreaded:

An error occurred while uploading the sketch
avrdude: Expected signature for ATmega328P is 1E 95 0F
Double check chip, or use -F to override this check.

How do I get the IDE to work with my board? It runs the Arduino Uno environment flawlessly, except that it has a "-PU" and is programmed via a programmer.

Thanks in advance,

mark

I recommend MiniCore:

It has out of the box support for ATmega328. No need to make any modifications.

I installed the package and select the ATMega328 style boards and still get the dreaded:

An error occurred while uploading the sketch
avrdude: Expected signature for ATmega328P is 1E 95 0F
Double check chip, or use -F to override this check.

Looking at the documentation, I don't see the "-PU" listed. I see P,PA,PB.

Help!

mark

Selecting the "PA" seems to work...

Now my board is non-responsive.

HELP!

mark

-PU is just the IC package code. The important thing to understand is that you have an ATmega328 (not an ATmega328P, not an ATmega328PA, not an ATmega328PB, just ATmega328).

So you need to select Tools > Board > MiniCore > ATmega328 and then Tools > Variant > 328 / 328A.

Make sure you also select the appropriate Tools > Clock configuration for your board.

The programmer can no longer talk to the chip:

Sketch uses 17080 bytes (52%) of program storage space. Maximum is 32256 bytes.
Global variables use 937 bytes (45%) of dynamic memory, leaving 1111 bytes for local variables. Maximum is 2048 bytes.
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Problem uploading to board. See https://support.arduino.cc/hc/en-us/sections/360003198300 for suggestions.

I select m328/m328A, clock is 16 MHz, matching my board.

I can no longer upload the board via the debugger. How does one recover from this?

mark

Please provide more information. Which debugger are you using?

USPTiny. It's worked for years and was able to do the download.

Thanks for helping... I seem to have worked myself into a corner.

Selecting the USPTiny for MiniCore allowed a download, but the board is, again, not working.

I'm digging to see what else changed...

mark

My bad. Found a bug.

With your help I'm able to download and change programming.

Thank you very much!

mark

I'm glad to hear it is working now. Enjoy!

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