Arduino Mega 2560


I am using an Arduino Mega 2560 board for my project. Whenever I power it up the digital pin13 toggles twice which is connected to the board led. My hardware is ready and i have used the pin 13 in my project also. Whenever power is given to the Mega2560 this pin toggles twice. I want to remove this toggling, because it will affect my project. Is this related to bootloader then can anyone please provide me bootloader for non toggling pin 13.


You can try this one (not tested. I set the “REMOVE_BOOTLOADER_LED” option that already existed.)
(compiled using a newer version of avr-gcc, though, so I don’t know if it’ll work… Even without any changes to the source, the binary produced was significantly different.)

(Do you have a way to program a new bootloader? Don’t forget to save a copy of the original .hex file…) (6.59 KB)

Hi Westfw

No I dont have any way to program a new bootloader. Can you tell me how i can change and upload this new bootloader hex file to Arduino Mega 2560. Do I need ISP loader or with another Arduino Mega 2560 I can program the bootloader.


Yes, you should use another working Arduino as a programmer to burn the bootloader on a Mega 2560. The example sketch ArduinoISP makes an Arduino a programmer. Inside the sketch are plenty of details about how it is used, plus there are tutorials online you can find. The ISP pins are on the ICSP header next to the main processor, the male pins arranged in 2 rows of 3 pins. On the Tools menu choose the programmer type "Arduino as ISP".