Expected signature for ATmega328P is 1E 95 0F. Double check chip, or use -F

Changed the avrdude.conf file as instructed but same error as always

avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch

System wide configuration file is "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf"
User configuration file is "/Users/roberthancock/.avrduderc"
User configuration file does not exist or is not a regular file, skipping

Using Port : /dev/cu.wchusbserial1420
Using Programmer : stk500v1
Overriding Baud Rate : 19200
AVR Part : ATmega328P
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :

Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


eeprom 65 20 4 0 no 1024 4 0 3600 3600 0xff 0xff
flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00

Programmer Type : STK500
Description : Atmel STK500 Version 1.x firmware
Hardware Version: 2
Firmware Version: 1.18
Topcard : Unknown
Vtarget : 0.0 V
Varef : 0.0 V
Oscillator : Off
SCK period : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################Error while burning bootloader.
################################## | 100% 0.08s

avrdude: Device signature = 0x1e4040
avrdude: Expected signature for ATmega328P is 1E 95 05
Double check chip, or use -F to override this check.

avrdude done. Thank you.

No, this is not the same error as always. The signature has changed from 0x1e9405 to 0x1e4040 and this is an important bit of information. DrAzzy asked you back in the first reply if it was reading the same signature every time you tried burning the bootloader and you said:

nekton123:
Dr Azzy. Yes. Always the same error.

However, if you didn't notice the signature change this time it makes me suspect that maybe you only meant that you're getting "avrdude: Expected signature for ATmega328P is 1E 95 05" every time and you didn't bother to look at what the actual signature read from the chip was. If the signature is changing every time that's a completely different situation.

This succeeded:

This succeeded:

Mac-mini:etc roberthancock$ /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude -C/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf -F -V -u -v -patmega328p -cstk500v1 -P/dev/cu.wchusbserial1420 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0xFD:m -Uhfuse:w:0xDA:m -Ulfuse:w:0xFF:m

avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch

System wide configuration file is "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf"
User configuration file is "/Users/roberthancock/.avrduderc"
User configuration file does not exist or is not a regular file, skipping

Using Port : /dev/cu.wchusbserial1420
Using Programmer : stk500v1
Overriding Baud Rate : 19200
AVR Part : ATmega328P
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :

Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


eeprom 65 20 4 0 no 1024 4 0 3600 3600 0xff 0xff
flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00

Programmer Type : STK500
Description : Atmel STK500 Version 1.x firmware
Hardware Version: 2
Firmware Version: 1.18
Topcard : Unknown
Vtarget : 0.0 V
Varef : 0.0 V
Oscillator : Off
SCK period : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.08s

avrdude: Device signature = 0x1e4040
avrdude: Expected signature for ATmega328P is 1E 95 0F
avrdude: erasing chip
avrdude: reading input file "0x3F"
avrdude: writing lock (1 bytes):

Writing | ################################################## | 100% 0.11s

avrdude: 1 bytes of lock written
avrdude: reading input file "0xFD"
avrdude: writing efuse (1 bytes):

Writing | ################################################## | 100% 0.03s

avrdude: 1 bytes of efuse written
avrdude: reading input file "0xDA"
avrdude: writing hfuse (1 bytes):

Writing | ################################################## | 100% 0.13s

avrdude: 1 bytes of hfuse written
avrdude: reading input file "0xFF"
avrdude: writing lfuse (1 bytes):

Writing | ################################################## | 100% 0.08s

avrdude: 1 bytes of lfuse written

avrdude done. Thank you.

OK, but note that's only the first step of the Burn Bootloader process. It only set the fuses. It did not flash the bootloader to the microcontroller.

I notice that the signature is 0x1e4040 again now, so there is some consistency to what it's reading.

In fact, I tried it twice both with the original signature and your modified signature and the command line

Mac-mini:etc roberthancock$ /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude -C/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf -F -V -u -v -patmega328p -cstk500v1 -P/dev/cu.wchusbserial1420 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0xFD:m -Uhfuse:w:0xDA:m -Ulfuse:w:0xFF:m

So now how to get to the second step?

What CLI do I need?

I tried this:

Mac-mini:etc roberthancock$ /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude -C/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf -F -V -u -v -patmega328p -cstk500v1 -P/dev/cu.wchusbserial1420 -b19200 -e -Uflash:w:/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/bootloaders/atmega/ATmegaBOOT_168_atmega328_pro_8MHz.hex

avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch

System wide configuration file is "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf"
User configuration file is "/Users/roberthancock/.avrduderc"
User configuration file does not exist or is not a regular file, skipping

Using Port : /dev/cu.wchusbserial1420
Using Programmer : stk500v1
Overriding Baud Rate : 19200
AVR Part : ATmega328P
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :

Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


eeprom 65 20 4 0 no 1024 4 0 3600 3600 0xff 0xff
flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00

Programmer Type : STK500
Description : Atmel STK500 Version 1.x firmware
Hardware Version: 2
Firmware Version: 1.18
Topcard : Unknown
Vtarget : 0.0 V
Varef : 0.0 V
Oscillator : Off
SCK period : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.08s

avrdude: Device signature = 0x409540
avrdude: Expected signature for ATmega328P is 1E 95 0F
avrdude: erasing chip
avrdude: reading input file "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/bootloaders/atmega/ATmegaBOOT_168_atmega328_pro_8MHz.hex"
avrdude: input file /Applications/Arduino.app/Contents/Java/hardware/arduino/avr/bootloaders/atmega/ATmegaBOOT_168_atmega328_pro_8MHz.hex auto detected as Intel Hex
avrdude: writing flash (32652 bytes):

Writing | ################################################## | 100% 0.00s

avrdude: 32652 bytes of flash written

avrdude done. Thank you.

Mac-mini:etc roberthancock$

and NOW I have a heartbeat pulse at the LED like I expected and never had from the original new part.

It also gives the triple LED flash at a reset, which it has never done before since new.

Probably cannot trust it, but the learning has been an education.

Thanks for everybody's help here.

I was able to upload the Basics blink sketch to it and it identifies as a 328P

avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch

System wide configuration file is "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf"
User configuration file is "/Users/roberthancock/.avrduderc"
User configuration file does not exist or is not a regular file, skipping

Using Port : /dev/cu.usbserial-00000000
Using Programmer : arduino
Overriding Baud Rate : 57600
AVR Part : ATmega328P
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :

Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


eeprom 65 20 4 0 no 1024 4 0 3600 3600 0xff 0xff
flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00

Programmer Type : Arduino
Description : Arduino
Hardware Version: 2
Firmware Version: 1.16
Vtarget : 0.0 V
Varef : 0.0 V
Oscillator : Off
SCK period : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: reading input file "/var/folders/wg/cvn1t_xj5qzdjb0ktl5hfkjm0000gn/T/arduino_build_697572/Blink.ino.hex"
avrdude: writing flash (924 bytes):

Writing | ################################################## | 100% 0.51s

avrdude: 924 bytes of flash written
avrdude: verifying flash memory against /var/folders/wg/cvn1t_xj5qzdjb0ktl5hfkjm0000gn/T/arduino_build_697572/Blink.ino.hex:
avrdude: load data flash data from input file /var/folders/wg/cvn1t_xj5qzdjb0ktl5hfkjm0000gn/T/arduino_build_697572/Blink.ino.hex:
avrdude: input file /var/folders/wg/cvn1t_xj5qzdjb0ktl5hfkjm0000gn/T/arduino_build_697572/Blink.ino.hex contains 924 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.43s

avrdude: verifying ...
avrdude: 924 bytes of flash verified

avrdude done. Thank you.

Great work on figuring out the second command before I got back on the forum!

That's great it's working now. An inconsistent signature reading from the programmer can be caused by bad connections in the wiring between the programmer and the target. However, if that were the case I would also expect you to have some failures when you tried to run the Burn Bootloader commands and it seems like those were working first try so that's quite strange. I would still be suspicious of that board and not use it for any finished projects. It might be ok to use just for tinkering around with, but make sure that if you ever have any strange problems when using that board that you try the same code on a known-good board to make sure the problem isn't specific to the weird board so you don't waste a lot of time trying to troubleshoot a phantom problem.

That's really weird. I don't think I've ever heard of a problem that causes a chip to mis-identify with the correct signature for a DIFFERENT chip. Quite a lot has to be working correctly for a full signature to be read, and the fact that you were eventually able to burn a bootloader and upload blink is a pretty strong indication that the chip really is an ATmega328 (of some kind. the m169 also only has 16k of flash...

There have been occasional rumors that the signature bytes and other supposedly "read only" fuse-like memory locations might be writable via some undocumented programming commands (probably with HVSP), but I don't think it was ever proven. Perhaps this was a bad batch (atmel can pretty clearly program those locations at least once...) that got diverted from the trash and put on boards, with or without the vendor figuring out how to get around the bad signature.

Neckton.

Do NOT HIJACK or multi post !
It simply wastes peoples time and effort.
Your other post DELETED.

Bob.

Sorry Bob—I mis-posted and there seems to be no way to delete a post. Won't happen again.
But when wrapping knuckles, at least get name correct—it's nekton123, not neckton.

Think yourself lucky...it was Necktie until a fight with auto correct was defeated. :slight_smile:

Bob.

How many Nektons are there?