Burn Arduino Bootloader With Arduino MEGA!





Introduction: Burn Arduino Bootloader With Arduino MEGA!

About: In a world where the blind leads the blind, who do you follow?

Based on the official ArduinoISP Tutorial:

This procedure allows using a working arduino to program the bootloader of another ATMega chip using SPI as ICSP.  It saves you having to purchase another peripheral (such as USBTinyISP).

Arduino as ISP relies on the SPI bus to transact the communications.  On an older 168/328 the SPI bus is on pins 10 11 12 13.  On a Mega(1280/2560) the SPI bus is moved over to the 50 51 52 53 pins!

I fought and fought and fought with the darn thing until I realized I had it wired incorrectly.

Thankfully, it's all translated in the ISP Sketch -
Slave reset - destination pin 'reset', connect to source 53
MOSI - destination pin 11, connect to source 51
MISO - destination pin 12, connect to source 50
SCK  - destination pin 13, connect to source 52

Using Arduino 1.0 IDE write the arduino isp sketch (in examples) to the Mega, then change the board settings to the target (in my case dumilenove with 328) and com port stays the same.

burn bootloader, and tada!



    • Oil Contest

      Oil Contest
    • Clocks Contest

      Clocks Contest
    • Water Contest

      Water Contest

    16 Discussions

    this is frikin amazing, i have been searching for a post like this for like 2 weeks, arduino nano finally loaded with bootloader!

    thank you so so much!

    "change the board settings to the target" how?


    I had an issue with my arduino mega 2560 that is the watchdog timer code was not working. After burning the bootloader issue resolved.

    But my question is what are the changes that has happened to Mega2560 after burning bootloader. If any new issue arises can I revert it back to old bootloader ?

    Hi, I got this error while I followed your tutorial exatly.

    Arduino: 1.6.5 (Windows 8.1), Board: "Arduino NG or older, ATmega8"

    "efuse" memory type not defined for part "ATmega8"

    Error while burning bootloader.

    This report would have more information with

    "Show verbose output during compilation"

    enabled in File > Preferences.

    Please help. thanks.

    Hi thanks for post..

    I followed and burn bootloader successfully(i burn into arduino mega 2650 by another mega 2650 board), but after that what to do i mean when i connected burned bootloader board to system with usb cable no usb is being detected..???

    Does this work backwards? Like Uno to Mega? I have exactly the same model but I think the RAMPS (a kind of arduino shield) has messed up the bootloader and I need to reset it.

    I have successfully Burn my 6 chips with in a minute like a charm :) , after a lot of search n headache i have found this useful link , first i tried burning the boot loader into my empty chips using two arduino 1) Arduino Mega2560 ,2) Arduino dumilenove it worked but after playing with boot loaders i have made a arduino on breadboard now i only need one arduino device to burn the bootloader into the Atmega chips, i will post the link for you people.

    I got it to burn the bootloader, but the UNO I have doesn't accept any sketches. It keeps giving me the "not in sync" error. That's the whole reason I even tried to reinstall the bootloader. Do you have any idea why this could be happening? I checked all COM ports, looked at the IDE and the device, all that's correct.

    1 reply

    my dumilenove was doing that and reburning the bootloader didn't help; something was wrong - replaced the chip, and after burning the bootloader it worked. I can't comment to why it isn't working after the bootloader is on there. Could it be a driver issue? Are you getting a 'fully installed' com port in device manager?

    Does this not work with an Arduino Uno and a Mega 2560? I'm getting an error when burning the boot loader, avrdude: stk500_getsync(): not in sync: resp=0x00

    1 reply

    That's the generic error - it can mean almost anything.

    It should work with an uno (328p) and mega; make sure you have the pin numbers correct, as well as power and ground. Also, make sure the arduino environment is set for the mega to program the mega sketch, then the uno to burn the bootloader.

    hey man, been watching your youtube channel - I'm looking into controlling a WS2801 or similar addressable LED strip with either an Arduino or a Teensy - I was curious if you ever made progress with that, I'd really appreciate a few pointers on where to start the whole process (new at this) :) Thanks a lot!

    John Caza

    1 reply

    I've got it working so it displays calculated animations, just not stuff loaded from SD card. I'm working on an ible about it, but until I get the bugs out the SD version isn't gonna happen. As for getting the strips just working, check out the fastspi library - it's great and fairly easy to write code for.

    Thanks...Those 2 boards is what I own too so this helps if I ever need to bootload another atmega chip.

    1 reply

    You're welcome -- not sure how I cooked my old one but it really came in handy when I needed the new one working!