Hi all, I’ve recently bought a couple atmel 328PUs from a local supplier, I am trying to bootload them to work in my Arduino projects, however no matter how I have them wired, or what settings I try I consistently get the device signature is 0x000000 from avrdude, and the “Yikes! Invalid device signature” error. In the past despite how confident I was that I had the wiring right, it indeed always was wiring/code errors, however I’ve been banging my head against the wall for the last couple days and can’t make any headway. I need some advice, is it likely that two (I swapped out one 328 for another at one point) 328s could be bad? The vendor kept them lose in a communal bag, could that be a problem? I can write out the whole process I’ve gone through so far include verbose error messages if that helps, I don’t even know if this is the right place to be posting this TBH.
Show us a picture of how you have them wired up
And a pic of the chip…
Have you tried a different breadboard? A few of those sockets look pretty beat up.
Also jumper wires can be flakey too.
See photo, new breadboard and fresh wire.
Also below is the error message now, interestingly the fuses appear to get set but refuses to initialize:
`avrdude: Version 6.3-20201216
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Users\Harappa\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.1.3/avrdude.conf"
Using Port : COM3
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.02s
avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: erasing chip
avrdude: reading input file “0x3f”
avrdude: writing lock (1 bytes):
Writing | ################################################## | 100% 0.01s
avrdude: 1 bytes of lock written
avrdude: verifying lock memory against 0x3f:
avrdude: load data lock data from input file 0x3f:
avrdude: input file 0x3f contains 1 bytes
avrdude: reading on-chip lock data:
Reading | ################################################## | 100% 0.00s
avrdude: verifying …
avrdude: 1 bytes of lock verified
avrdude: reading input file “0b11111111”
avrdude: writing efuse (1 bytes):
Writing | ################################################## | 100% 0.01s
avrdude: 1 bytes of efuse written
avrdude: verifying efuse memory against 0b11111111:
avrdude: load data efuse data from input file 0b11111111:
avrdude: input file 0b11111111 contains 1 bytes
avrdude: reading on-chip efuse data:
Reading | ################################################## | 100% -0.00s
avrdude: verifying …
avrdude: 1 bytes of efuse verified
avrdude: reading input file “0b11010110”
avrdude: writing hfuse (1 bytes):
Writing | ################################################## | 100% 0.03s
avrdude: 1 bytes of hfuse written
avrdude: verifying hfuse memory against 0b11010110:
avrdude: load data hfuse data from input file 0b11010110:
avrdude: input file 0b11010110 contains 1 bytes
avrdude: reading on-chip hfuse data:
Reading | ################################################## | 100% 0.01s
avrdude: verifying …
avrdude: 1 bytes of hfuse verified
avrdude: reading input file “0b11110111”
avrdude: writing lfuse (1 bytes):
Writing | ################################################## | 100% 0.02s
avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0b11110111:
avrdude: load data lfuse data from input file 0b11110111:
avrdude: input file 0b11110111 contains 1 bytes
avrdude: reading on-chip lfuse data:
Reading | ################################################## | 100% 0.01s
avrdude: verifying …
avrdude: 1 bytes of lfuse verified
avrdude done. Thank you.
C:\Users\Harappa\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino18/bin/avrdude -CC:\Users\Harappa\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.1.3/avrdude.conf -v -patmega328p -cstk500v1 -PCOM3 -b19200 -Uflash:w:C:\Users\Harappa\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.1.3/bootloaders/optiboot_flash/bootloaders/atmega328p/16000000L/optiboot_flash_atmega328p_UART0_115200_16000000L_B5.hex:i -Ulock:w:0x0f:m
avrdude: Version 6.3-20201216
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Users\Harappa\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.1.3/avrdude.conf"
Using Port : COM3
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.02s
avrdude: Device signature = 0x000000 (retrying)
Reading | ################################################## | 100% 0.02s
avrdude: Device signature = 0x000000 (retrying)
Error while burning bootloader.
Reading | ################################################## | 100% 0.02s
avrdude: Device signature = 0x000000
avrdude: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override
this check.
avrdude done. Thank you.`
Could be a bad chip…
We did have a Arduino programmer shield at the Space…
No idea what shape its in (it was in the small tote labelled Arduino).. If it works then it may help rule out a fault in your wiring... I also have one at home somewhere.. I
ll see if I can find it…
Are you installing the bootloader using the Arduino IDE?
Yes, I am using the Arduino as ISP sketch, I know it works as I’ve used it to program some ATTiny45’s, which is another story! Any help is really really appreciated!!! I am really wondering if they are bad, who knows how long they where in loose in that bag.
Just wondering if you tried -F option suggested above?
Also perhaps try a new crystal and get it closer to the chip without those long leads.
That’s a no on that one, I’ve read repeatedly that it is only for one or two reasons that are not encountered anymore with avr ICs. I can find one of the references mentioning this if you want more solid proof.
Hi Majicj, missed your second sentence, I’ve moved the crystal right next to the pins, any closer and I’d need solder . Also swapped in a different crystal, no joy.
Grasping at straws here. Maybe try placing the ATmega328P directly on the breadboard and skip the extra socket?
Do you have a scope/multimeter? Check your power levels.
Actually the socket is new, the issue predates it, I thought the socket would make moving it back and forth from the ISP breadboard to the project breadboard quicker and easier, but actually it is slower, as it bends the pins a bit…
I have a multi-meter I used it to check for continuity, and that I was getting power where it should be getting power, it is a very basic model, I have no scope at all.
I’d suggest popping into VHS and trying out the programmer there.
It seems like perhaps you’ve got a couple of bad atmegas there.
One way to know for sure is to find a known good one and program it with your current setup.
I’m out of suggestions.
I’m grateful for any suggestions at this point! Ha ha ha! When is a good time? I will be out of town Tuesday, and part of Monday, but otherwise free. The only 328 I know of that is confirmed good is in my Uno at the moment.
I can do Thursday noonish for a bit. I’ll pm you my contact info.
Text sent thanks!