1

I am making a project where I use standalone atmega2560. I used arduino mega schematic to put all necessary components so atmega2560 would be working. I tried to burn bootloader into it using arduino mega as ISP, but failed. I get this error:

C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega2560 -cstk500v1 -PCOM4 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0xFD:m -Uhfuse:w:0xD9: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:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"

         Using Port                    : COM4
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x03
         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)

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.

I use schematic which I attached.

At first I uploaded arduinoISP example code to my arduino mega and then used it to program several arduino megas to be sure that it is working and then I connected cables to arduino mega ISCP connector which is master and then put them into my PCB board X3 connector which also has SPI connected to it. After trying to burn bootloader I got an error above.

Things I already did: Made sure that all VCC pins are connected. And AVCC is connected to VCC Made sure that all GND pins have ground and my PCB has same GND level as arduino mega (programmer) Made sure that I connected SPI correctly. Made sure that arduino as ISP is working. Made sure that VCC level is high (it is about 4.7 V) I also tried to put external voltage, but it also did not help. I tried putting capacitor between Reset and GND pins on arduino mega (programmer)

What could go wrong? After all my struggles I came to the conclusion that it is probaby hardware problem, but I cannot find it. Also I read that atmega2560 by default use 8 MHZ internal clock, can it be a problem? enter image description here

8
  • What exactly is the RESET signal of your target connected to on the "programmer" Arduino? What pin? – timemage Feb 22 at 17:44
  • 1
    RESET in my arduino mega(programmer) is connected to digital pin 10. I also tried connecting it to digital pin 53 which is slave select, while doing so I change the code. Both methods did not work. In my board RESET is inverted atmega2560 RESET – Paulius r Feb 22 at 19:18
  • 1
    You know there is widely used ISP header pinout and you are using something completely different? – KIIV Feb 22 at 19:25
  • I use ISP header you just mentioned except RESET pin. I use RESET pin from programmer side as digital pin 10 as mentioned in arduino ISP firmware and website. – Paulius r Feb 22 at 19:41
  • 1
    Oh sorry. I see what you mean... Yeah I am not using standard header. That is a good point and I should use a standard one, but I am aware of my pinout and I am sure that I connect MISO to MISO, MOSI to MOSI and so on. – Paulius r Feb 22 at 20:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.