Arduino ISP problem

I tried to program my Arduino mega 2560 using my Arduino Nano because when I did my experiment with my mega using 12v its USB to SERIL converter I.C. was burned. I could not upload a new program because its not deal with my USB, and it still executes the last program I uploaded before it was burned. So I used pin connections as follows.

Nano(Programmer) Mega (Target)
D10 D10
D11 D51
D12 D50
D13 D52

First I uploaded "ArduinoISP" sketch to my Nano (Programmer: AVRISP mkll) then connected two board as above connection. Then I selected blink sketch and change setting as board: Arduino mega or Mega2560 and Programmer: Arduino as ISP.
I tried to upload Sketch but it was impossible. My IDE gives following error message.

...........................................................................................................................................................................

Arduino: 1.8.12 (Windows 10), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

Sketch uses 1448 bytes (0%) of program storage space. Maximum is 253952 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 8183 bytes for local variables. Maximum is 8192 bytes.
C:\Users\RRK\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude -CC:\Users\RRK\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf -v -patmega2560 -cwiring -PCOM11 -b115200 -D -Uflash:w:C:\Users\RRK\AppData\Local\Temp\arduino_build_348511/Blink.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:\Users\RRK\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

         Using Port                    : COM11
         Using Programmer              : wiring
         Overriding Baud Rate          : 115200
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer

avrdude done.  Thank you.

An error occurred while uploading the sketch

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

...........................................................................................................................................................................

I do not know what is wrong with me. I read the article about Arduino ISP published by Arcuino.cc but no fix was found and this error is still happening.

So please help me to fixed this problem.
Thankyou.
(Code tags added by Moderator.)

When you do this style of upload, you can't use the normal "Upload" button. Instead, you need to select Sketch > Upload using Programmer from the Arduino IDE's menus.

NANO D10 -> RESET on the MEGA2560 :slight_smile:

1 Like

You have tried to upload the blink sketch to the Nano with settings for the Mega.
First refresh the ISP sketch on the Nano, just to make sure it didn't get botched by your previous attempts.
Then set the IDE for the Mega board, and select "Arduino as ISP" in the programmer setting.
After that you only use "Upload using programmer" as @pert suggested. Don't touch the Upload button, or you may mess up the Nano.

A better alternative would be to use an external USB-UART adapter connected to the RX/TX pins of the main chip of the Mega (pins 0 & 1). You may need to break the connection from the blown onboard USB chip if it interferes with the communication.
You will have to "Burn bootloader" through the Nano first, since it have probably been erased already.
Then you can upload normally, as if the Mega was intact.

Its Solved! :slightly_smiling_face: :slightly_smiling_face:.
Thank you very much for your advices.

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