Problem fashing Marlin using ICSP

Hello everyone,

I'm launching a little call for help! I currently have a control board equipped with an Atmega 2560 to drive a 3D resin printer. It's the NanoDLP card for those who know it.
There is a Marlin on the Atmega but I would like to be able to modify it to add features to my printer. So I need to flash a new Marlin using the ICSP ports on the board.
To do this I use an Arduino MEGA that I use as a programmer.
I have connected the following PINs:

Arduino NanoDLP card
Pin 53 RESET
Pin 52 SCK
Pin 51 MOSI
Pin 50 MISO
5V Vcc
GND GND

I followed the following procedure using ArduinoIDE:

  1. Select Board as MEGA 2560 and the serial port it is connected
  2. I uploaded the ArduinoISP program on the arduino programmer
  3. I connected the two boards as above
  4. I selected the programmer board as "Arduino as ISP
  5. I uploaded Marlin using "Upload using programmer".
  6. ERROR

I get this error from avrdude:

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

Do you know what am i missing ?

Thank you !

Please do this:

  • (In the Arduino IDE) File > Preferences
  • Uncheck the checkbox next to "Show verbose output during: compilation"/
  • Check the checkbox next to "Show verbose output during: upload".
  • Click the "OK" button.
  • Attempt an upload, as you did before.
  • After the upload fails, you'll see a button on the right side of the orange bar "Copy error messages" (or the icon that looks like two pieces of paper at the top right corner of the black console window in the Arduino Web Editor). Click that button.
  • In a forum reply here, click on the reply field.
  • Click the </> button on the forum toolbar. This will add the forum's code tags markup to your reply.
  • Press "Ctrl + V". This will paste the upload output between the code tags.
  • Move the cursor outside of the code tags before you add any additional text to your reply.
Arduino : 1.8.14 Hourly Build 2021/01/29 11:33 (Windows 10), Carte : "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

Le croquis utilise 57850 octets (22%) de l'espace de stockage de programmes. Le maximum est de 253952 octets.

Les variables globales utilisent 2477 octets (30%) de mémoire dynamique, ce qui laisse 5715 octets pour les variables locales. Le maximum est de 8192 octets.

C:\arduino\arduino-nightly\hardware\tools\avr/bin/avrdude -CC:\arduino\arduino-nightly\hardware\tools\avr/etc/avrdude.conf -v -patmega2560 -cstk500v1 -PCOM6 -b19200 -Uflash:w:C:\Users\loloi\AppData\Local\Temp\arduino_build_586299/Marlin.ino.hex:i 



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:\arduino\arduino-nightly\hardware\tools\avr/etc/avrdude.conf"



         Using Port                    : COM6

         Using Programmer              : stk500v1

         Overriding Baud Rate          : 19200

         AVR Part                      : ATmega2560

         Chip Erase delay              : 9000 us

         PAGEL                         : PD7

         BS2                           : PA0

         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    10     8    0 no       4096    8      0  9000  9000 0x00 0x00

           flash         65    10   256    0 yes    262144  256   1024  4500  4500 0x00 0x00

           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00

           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00

           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00

           lock           0     0     0    0 no          1    0      0  9000  9000 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)



Une erreur est survenue lors du transfert du croquis

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.





Ce rapport pourrait être plus détaillé avec
l'option "Afficher les résultats détaillés de la compilation"
activée dans Fichier -> Préférences.

Voila le rapport d'avrdude !

You can check the possible solutions provided by the answers associated with the "Device signature = 0x000000" issue you're having in this troubleshooting guide:

Arduino NanoDLP card
Pin 53 RESET

ArduinoISP
#define RESET 10 // Use pin 10 to reset the target rather than SS

Thank you for your answers, I will dive into your link to find a solution.
If I use PIN 10 for RESET, do I have to change things in the ArduinoISP sketch ?

No. You can just use the sketch as you find it in the Arduino IDE at File > Examples > 11.ArduinoISP > ArduinoISP

Of you can modify the sketch for pin 53 and reupload it to the Mega board if you prefer to use your current wiring.

thank you !
How do I know if my card needs an external clock?
The card I have is already functional so I assume that a clock source is already connected to the ATMEGA?

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