Can't burn ATMEGA328p-pu

Hello, i just bought a atmegap-pu and im trying to brun the bootloader on it but with no success. Im using an arduino uno to burn it. I tried the standard arduino guide for burning, but i get an error message: Failed chip erase: uploading error: exit status 1 when i try to burn the bootloader...

"C:\Users\1600\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude" "-CC:\Users\1600\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf" -v -patmega328p -cstk500v1 -PCOM3 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0xFD:m -Uhfuse:w:0xDE: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 "C:\Users\1600\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/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.03s

avrdude: Device signature = 0x000000 (retrying)

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.

Failed chip erase: uploading error: exit status 1

I also tried Nick Gammons method but i get:
08:28:09.077 -> Attempting to enter ICSP programming mode ......................................................
08:28:15.428 -> Failed to enter programming mode. Double-check wiring!
08:28:15.474 -> Programming mode off.

At this moment it looks like something with the wiring. Check these 6 wires carefully.
I hope you have the ISP sketch uploaded.
Post the picture of your setup.

BTW, good job posting log include the command.

1 Like

Hey, thank you for the quick response. I've connected everything right but I noticed i actually have Atmega328P U, and avrdude tells me:
avrdude: Device signature = 0xff00ff
avrdude: Expected signature for ATmega328P is 1E 95 0F

Does having Atmega328P U instead of Atmega328P PU make a difference?

Now every guide i have seen says to edit the avrdude.conf file, but i cant seem to find it.

@krpreistoric
The 328-PU is the old version of the 328P-PU but the markings on the IC will be different.
If it says 328P U then it is the newer 328P- PU IC.
Don' mess with avrdude.conf unless you know what you are doing.

As @Budvar10 pointed out you probably have a wiring error.

1 Like

This is the wiring:


averdude when burning ArduinoISP example(Board: Arduino Uno; Programmer: Arduino as ISP)

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 "C:\Users\1600\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/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.03s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x000000 (retrying)

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.

Failed chip erase: uploading error: exit status 1

and i checked, there is continuity between the arduino and the atmega

This is probably some floating shortage on data wires.

Can't tell from your photo if your connections are correct.
Has the IC ever been programed before?

1 Like

I would say GND on right side is incorrect, blue wire.
What is the resistor value?
If you have DMM, try to check wires, their resistance. Check the power voltage on the target MCU.
The reset pin should have +5V and as the reset pulse arrives at the beginning of the upload process, it should be perfectly visible on DMM as short time voltage drop to 0V.
Can't say the correct orientation of the 328P from this photo.

1 Like

Resistor is 10k and the wires are no more than 0.5ohms, I changed the GND wire to the correct position(not sure if the incorrect wiring damaged it, but still get the avrdude: Device signature = 0x000000, the avrdude: Device signature = 0xff00ff was because one pin didnt have contact i but changed it). The voltage between the reset pin and GND is 4.88v, drops to 0v for a quarter of a second when i hit run "Burn Bootloader", then back to 4.88v.

The one on the breadboard hasn't, arrived yesterday.

If you are sure the connections are correct then I would think that the 328 is no good.
Do you have another you could try?
From where did you by the 328?

1 Like

Hmm..
Really like faulty MCU.

It was probably AREF pin and it can cause damage on internal circuit but not the whole MCU.

1 Like

I bought it on a online marketplace, similar to ebay but based in my country. Buying it from legit vendors from amazon is too expensive, because of the shipping cost, which can be up to 3x the price of the product.

I understand.
With the wiring fix does it work now?

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