I'm trying to use Arduino Uno as ISP to program Arduino Mega 2560 using this Pin connections (Uno->Mega):
slave reset: 10: -> RESET on target
MOSI: 11: -> 51
MISO: 12: -> 50
SCK: 13: -> 52
It runs perfectly when I "Burn Bootloader" from Arduino IDE and LED starts blinking on target. So I assume my pin connections are correct.
However, when I open the Blink example and perform "Upload Using Programmer" in Sketch tab after choosing "Arduino as ISP" in Tools>Programmer it uploads the code but LED on Mega doesn't blink.
I'm afraid that I have problem in my Mega Bootloader hex file and think it's not configuring Pin 13 as a LED pin. But in this case I shouldn't have seen the led blinking after burning the bootloader.
What am I missing here? I appreciate your help. -Bex
-
The problem may be related to reset. See arduino.stackexchange.com/a/19131/3879Milliways– Milliways2016年01月04日 11:13:15 +00:00Commented Jan 4, 2016 at 11:13
-
No, I checked the connections and they look fine. I set the RESET pin as D13 in Arduino Uno and don't think it's wrong. Also defined the RESET pin as D13 in the ArduinoISP Example.baqx0r– baqx0r2016年01月04日 18:03:14 +00:00Commented Jan 4, 2016 at 18:03
-
1When you "upload using programmer" the target board's bootloader is not involved, and I believe it actually gets removed by doing that.Chris Stratton– Chris Stratton2016年04月14日 14:07:06 +00:00Commented Apr 14, 2016 at 14:07
1 Answer 1
Find the file called "boards.txt" located in your Arduino installation directory. In my case, the path is "arduino-1.6.5/hardware/arduino/avr/boards.txt". Open it with your favourite text editor and locate the ATMEGA2560 section. (not in notepad, it breaks the file format, notepad++ my choice)
in boards.txt
- back-up the file incase you break it,
- find the line : mega.menu.cpu.atmega2560.bootloader.high_fuses=0xD8
- and change it with : mega.menu.cpu.atmega2560.bootloader.high_fuses=0xD9
Source : http://soc.ninja/documentation/programming-atmega2560-with-arduino-uno-or-mega/#rating-74
Explore related questions
See similar questions with these tags.