remove the chip atmega328p

Hello,

Wanting to flash a BGC card (for GIMBAL camera for drone) which no longer worked I saw that we could transform the arduino uno for that.

So I followed a tutorial that explained how arduino pro selecting mini by putting on arduino as ISP how to flasher this card. But that did not work and by nibbling a bit I find a comment that says to remove the chip atmega328p.
Neither one nor two I remove it from board arduino uno.
Result the flash did not work better but the worst once the chip atmega328p delivery I can no longer upload a program.

What did it happen? Someone can help me.
I ordered a new atmega328p with bootloader uno that I put on the card and it does not work better still impossible to upload I confess not to understand anything. What tests then I do to determine or is the problem and how to fix it.

I have delivered Arduino Uno card and AVRISP mk recheck the COM port nothing done after 1 to 2 mn for the error.

I even tried the card on another PC. All 2 under WIN10 and that work very well with other Uno nano and mega cards.

Le croquis utilise 928 octets (2%) de l'espace de stockage de programmes. Le maximum est de 32 256 octets.
Les variables globales utilisent 9 octets (0%) de mémoire dynamique, ce qui laisse 2 039 octets pour les variables locales. Le maximum est de 2 048 octets.
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x17
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x17
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x17
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x17
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x17
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x17
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x17
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x17
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x17
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x17
Problème de téléversement vers la carte. Voir http://www.arduino.cc/en/Guide/Troubleshooting#upload pour suggestions.

When you buy a new ATmega328P you need to burn the bootloader before you can do an upload over USB. I know the second one you bought was supposed to come with bootloader but it's possible it didn't so since you already have the AVRISP it's worth trying to burn the bootloader on it:

  • Connect AVRISP to Uno.
  • Plug AVRISP into your computer
  • If the AVRISP doesn't power the Uno (I know AVRISP mkII doesn't) then you need to power the Uno by connecting it to the USB on your computer or the barrel jack to a power supply.
  • Tools > Board > Arduino/Genuino Uno
  • Tools > Programmer > select the correct programmer
  • Tools > Burn Bootloader
  • Disconnect the power to the Uno
  • Disconnect the AVRISP from the computer
  • Disconnect the AVRISP from the Uno
  • Plug the Uno into the USB on the computer
  • Sketch > Upload

hi ok thanks for your answer.

So i take a working boards Uno and i changed the atmega328 by the atmega328 supposed to havent bootloader and … it works.
So i changed with the new one i 'll buy and you know …it works…

So the problem is my board.

but when i insert the atmega i have tried on the good board (i have upload the blink sketch inside) the sketch working on the bad board.

so where is the problem ?? is there any software in the board ? hardware problem ?

shyriu42:
but when i insert the atmega i have tried on the good board (i have upload the blink sketch inside) the sketch working on the bad board.

But you still can't upload to the bad board, is that correct?

shyriu42:
is there any software in the board ?

Official Unos and some of the clones have an ATmega16U2 for the USB-serial chip used for uploads. This is running some firmware. It's possible there is a problem with that firmware causing the upload to fail or the chip or another part of the board could be damaged. Most clone Unos use the CH340 chip and as far as I know you can't update the firmware on that chip.

i have this on board.

so i can flash it ? do you think if my 16u2 was out i can see the connection on the computer ?

I don't have any experience with messing with the ATmega16U2. Mine have always just worked correctly. It's possible it's damaged and flashing won't help but it's worth a try if you don't mind spending some time. I believe there are two different approaches possible. DFU program via the Atmel Flip software or ISP programming by connecting your AVRISP to the ICSP header next to the ATmega16U2. Maybe someone else can give you some advice on this.

You could also forget USB programming on that Uno just do uploads using your AVRISP from now on:

  • Connect the AVRISP to the ICSP header near the ATmega328P
  • Power the Uno if the AVRISP doesn't provide power to the board
  • Tools > Board > Arduino/Genuino Uno
  • Sketch > Upload Using Programmer

Note that when you do this the bootloader is removed from the ATmega328P so if you want to go back to doing USB uploads to the ATmega328P you need to do Tools > Burn Bootloader first. Of course this isn't a perfect solution because without the ATmega16U2 functioning you will no longer be able to use Serial Monitor.

oh ok but i haven't AVRISP i must buy one ?

shyriu42:
I have delivered Arduino Uno card and AVRISP mk

I took that to mean you had an AVRISP. If you want to buy an ISP programmer I'd recommend a USBasp, which is cheaper but you're probably better off just buying a new Uno if you can't get yours working.

problem of my english :slight_smile:

no i haven't you think my board is out of order ?

i try to do some tutorial to upload a new firmware in the 16u2 but when i connect the ISP pin5 to 6 and another thing to the GND nothing happen's no DFU mode.

So i found a solution with a Uno as isp i connect the wires. But signature problem. all ways that i do i'm behind a wall.

i'm sur that the board isn't out just this ..@^^@^@\ 16u2 firmware

with USBasp i really can reprogram the 16u2 ?

thanks to help me pert.

this is ok :

USBASP-Programmer

The USBasp can program any chip with ISP. ATmega16U2 - surely.
Try this command from command line:

$ avrdude -cUSBasp -p -?

You will obtain a list of programable MCUs with avrdude via USBasp.

Arduino as ISP works also and reliably. The most frequent problem which people do, is bad wiring.

I'd say just stick with the Arduino as ISP if you're only using it for the one time flashing of ATmega16U2 it's probably not worth buying an USBasp, and you won't have to wait on the China shipping. If you're going to use an ISP programmer from time to time though it's very nice to have a dedicated programmer and the price of the USBasp is pretty reasonable.

shyriu42:
this is ok :

USBASP-Programmer

I don't have any experience with that particular USBasp. I have heard some bad reviews of the ones in the metal enclosures but that one is plastic so maybe different. I would recommend getting the 6 pin version instead of the 10 pin version as the one at that link. The reason is the ICSP headers on Arduinos are 6 pin so you would need to buy the 10 pin to 6 pin adapter. This is the one I like:
www.ebay.com/itm/271489740923

hello

ok i have received my usbisp. and i try to flash the 16u2 chip on arduino uno board with progisp.

But i always have "chip enable program error". My usb is recognized as :
ZF-007 ISP Programmer Ver:1.0 (31/03/2017 15:57:44)

but when i saw that it s not working i have an idea to connecting the usbisp on the another isp connector near the 328p like the picture :
![|500x291](http://shyriu42.free.fr/flash arduino.jpg)

and with the 16u2 selected i flashed and something happens writing verifying ok. But i think i have flash the 328p with 16u2 .hex right ? how it's possible ? and now when i try to burn bootloader in the 328p i always have "chip enable program error".

i'm completly lost. And now ? how can i repare my board ? help me please

shyriu42:
ok i have received my usbisp. and i try to flash the 16u2 chip on arduino uno board with progisp.

But i always have "chip enable program error". My usb is recognized as :
ZF-007 ISP Programmer Ver:1.0 (31/03/2017 15:57:44)

I don't have experience with this process or progisp. Is there any more output other than "chip enable program error"? If there is then please post it all as this may help us to figure out the problem.

shyriu42:
but when i saw that it s not working i have an idea to connecting the usbisp on the another isp connector near the 328p like the picture :
![|500x291](http://shyriu42.free.fr/flash arduino.jpg)

and with the 16u2 selected i flashed and something happens writing verifying ok. But i think i have flash the 328p with 16u2 .hex right ?

That ICSP header is connected to the ATmega328P, the large socketed chip on the board. You can't program the ATmega16U2 via that header. You can use that header with the Arduino IDE functions Tools > Burn Bootloader or Sketch > Upload Using Programmer or also with other flashing tools separate from the Arduino IDE such as avrdude. If you weren't able to get USB uploads working again on your Uno you can still do Upload Using Programmer to load sketches to it, but you won't be able to use the Serial Monitor if the USB circuitry on the board isn't working correctly.

It's possible the ATmega16U2 or another part of the circuitry on the board is permanently damaged, or maybe you just haven't flashed the firmware to the ATmega16U2 correctly.

shyriu42:
Wanting to flash a BGC card (for GIMBAL camera for drone) which no longer worked I saw that we could transform the arduino uno for that.

Please post a link to where you saw that. Maybe it will provide us with some clues.

hi

on this web site :Reviving a Clone Basecam brushless gimbal controller.

first i try to do this and after i read somewhere that i need to remove the chip 328 from the board... and after doing this without success i replace the 328p on the board and i connected it to the pc and would like to replace the sketch arduinoisp by blink to see if my board is ok i started to have error stk500.

and that all :slight_smile: i supposed it s possible to reset all the 328p the 16u2 but when i look at the tutorials to burn bootloader on 328p chip it seems so easy but i always have

avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.

Error while burning bootloader.

all my tries finished with this error i really need help how can burn bootloader on a 328p chip

The instructions at that link don't say anything about removing the ATmega328P from the Uno and in fact they would not work if you did that. However, it would not damage your Uno.

Please do this:

  • Tools > Preferences > Show verbose output during > upload (check) > OK
  • Attach the USBasp to the ICSP header near the ATmega328P on your Uno
  • Plug the USBasp into your computer
  • Tools > Programmer > USBasp
  • Tools > Board > Arduino/Genuino Uno
  • Tools > Burn Bootloader
  • After the process fails you'll see a button on the right side of the orange bar "Copy error messages". Click that button.
  • Paste the error messages in a reply here.

ok but the result is without surprise my usbisp is not recognize by arduino ide :

C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -cusbasp -Pusb -e -Ulock:w:0x3F:m -Uefuse:w:0x05:m -Uhfuse:w:0xDE:m -Ulfuse:w:0xFF:m 

avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"

         Using Port                    : usb
         Using Programmer              : usbasp
avrdude: error: could not find USB device with vid=0x16c0 pid=0x5dc vendor='www.fischl.de' product='USBasp'

avrdude done.  Thank you.

Error while burning bootloader.

so i do this Arduino-er: Use Arduino Uno as ISP to burn Bootloader on ATmega328

![|500x351](http://shyriu42.free.fr/uno breadboard boot.jpg)

Arduino: 1.8.2 (Windows 10), Board: "Arduino/Genuino Uno"

C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -cstk500v1 -PCOM8 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0x05:m -Uhfuse:w:0xDE:m -Ulfuse:w:0xFF:m 

avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"

         Using Port                    : COM8
         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.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

and the famous error.

"avrdude: error: could not find USB device with vid=0x16c0 pid=0x5dc vendor='www.fischl.de' product='USBasp'"

Check out Post #2.

http://rayshobby.net/dead-simple-driver-installation-for-usbasp-and-usbtiny-on-windows/

I’ve used the Zadig program referred to at that link and found it to be very convenient.

forget the usbisp … why can’t do this with another arduino ?

ok this morning i decided to test with new virgin chip 328p (and i can validated my breadboard wires) .

Its works fine.

C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -cstk500v1 -PCOM8 -b19200 -Uflash:w:C:\Program Files (x86)\Arduino\hardware\arduino\avr/bootloaders/optiboot/optiboot_atmega328.hex:i -Ulock:w:0x0F:m 

avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"

         Using Port                    : COM8
         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: NOTE: "flash" memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "C:\Program Files (x86)\Arduino\hardware\arduino\avr/bootloaders/optiboot/optiboot_atmega328.hex"
avrdude: writing flash (32768 bytes):

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

avrdude: 32768 bytes of flash written
avrdude: verifying flash memory against C:\Program Files (x86)\Arduino\hardware\arduino\avr/bootloaders/optiboot/optiboot_atmega328.hex:
avrdude: load data flash data from input file C:\Program Files (x86)\Arduino\hardware\arduino\avr/bootloaders/optiboot/optiboot_atmega328.hex:
avrdude: input file C:\Program Files (x86)\Arduino\hardware\arduino\avr/bootloaders/optiboot/optiboot_atmega328.hex contains 32768 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% -0.00s

avrdude: verifying ...
avrdude: 32768 bytes of flash verified
avrdude: reading input file "0x0F"
avrdude: writing lock (1 bytes):

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

avrdude: 1 bytes of lock written
avrdude: verifying lock memory against 0x0F:
avrdude: load data lock data from input file 0x0F:
avrdude: input file 0x0F contains 1 bytes
avrdude: reading on-chip lock data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: 1 bytes of lock verified

avrdude done.  Thank you.

so what can i do to burn bootloader on the bad chip 328p ? fuses ? how can i changed ?