On your Master Mega –
- load the ArduinoISP sketch from the Examples
- change the Programmer to Arduino as ISP
Then connect the pins below to connect the Master Mega to the Slave Mega.
I’ve included the pins to connect the master to the slave.
one final note: you MUST put the 100nF capacitor between the Reset and the 5v on the Master Mega or you’ll get a failure each time.
Then plug in the Master Mega and then Tools -> Burn Bootloader.
I received an error at the end – I’m not sure why, exactly this happened, but I ignored it.
avrdude: verification error, first mismatch at byte ….
I unplugged both Megas from each other and put the blink sketch on the Slave Mega and it worked.
Here’s another version of the tutorial that I found while working on fixing my Mega http://www.instructables.com/id/How-to-use-Arduino-Mega-2560-as-Arduino-isp/?ALLSTEPS