This is a tutorial that explains how to burn the bootloader using 2 Arduino Mega. You can do this when the board suddenly stops working after using the board for a while and also as a last resort to see if the new board you got is a faulty board.
- Arduino Mega 2560 - 2
- Jumper wires - 6
- USB 2.0 cable - 1
Steps to follow
Choose the working board as your programmer.
Make the connections according to the below table
Controller (Pin number) Peripheral (Pin number) 50 - CIPO 50 - CIPO 51 - COPI 51- COPI 52 - SCK 52 - SCK 53 - SS RESET PIN
Open Arduino IDE.
Click on File > Examples > Arduino ISP.
In the ArduinoISP example, make the following changes according to the pin connection.
Make sure the board selected is mega 2560 and the correct port is selected, then upload the code.
After uploading the code. Go to
Tools > Programmer > 'Arduino as ISP'.
Tools > Burn Bootloader. It will take few minutes to be done.