How to burn boot loader of arduino uno r3 usin aurdino mega 2650

Hi All,
Can any one tell me how can I burn boot loader of uno r3 using atmega 2650??????????????????????

Using Arduino as ISP (File->Examples->ArduinoISP) to Burn Bootloader (Arduino 1.6.x)

ISP Arduino: These instructions should work on any Arduino compatible with a six-pin ICSP header (UNO, MEGA, Leonardo, etc) and a USB connection.

Target processor: Arduino board with an ATmega8, ATmega168, or ATmega328P

Step 1: INSTALL ArduinoISP SKETCH
Connect the USB cable to the PC and ISP Arduino

Upload the ArduinoISP sketch to the ISP Arduino.

  • File->Examples->ArduinoISP
  • Tools->Board->(select your ISP Arduino's type)
  • If present: Tools->Processor->(your ISP Arduino's processor and speed)
  • Tools->Port->(serial port for ISP Arduino)
  • File->Upload

Step 2: DISABLE AUTO-RESET ON THE ISP ARDUINO
Add a 10uF capacitor to the ISP Arduino with the positive side of the capacitor going to Reset and the negative side of the capacitor going to Ground. (Does this work when running ArduinoISP on a Leonardo?)

Step 3: CONNECT THE ISP ARDUINO TO THE TARGET BOARD

ICSP Header Pinout:

1:MISO 2:VCC
3:SCK 4:MOSI
5:/RESET 6:GROUND

Target is an Arduino board with an ATmega168, 328P, or 32u4 processor.

Wire the pins like this:

ISP
Arduino
Target
Arduino
ICSP1 ICSP1
ICSP2 ICSP2
ICSP3 ICSP3
ICSP4 ICSP4
Pin 10 ICSP5
ICSP6 ICSP6

In other words: ICSP pins 1, 2, 3, 4, and 6 connect directly and the target's ICSP5 (/RESET) connects to digital pin 10 on the ISP Arduino.

Step 4: READY TO BURN!

Now that you have everything wired you can attempt to burn a bootloader.

Note that even if you don't plan to use the serial bootloader (using "Upload Using Programmer" instead) you still need to go through this process once on each processor to set the hardware configuration fuses. Factory fresh chips run at 1 MHz so if your Arduino is running VERY slow someone may have skipped this step.

  • Tools->Board->(select your target Arduino type)
  • If present: Tools->Processor->(your target Arduino processor and speed)
  • Tools->Port->(serial port for ISP Arduino)
  • Tools->Programmer->Arduino as ISP
  • Tools->Burn Bootloader

If all has gone well: SUCCESS!

Step 5: TROUBLESHOOTING

If anything goes wrong, turn on verbose logging. Go to Preferences... and check the box for "Show verbose output during: [ ] compilation [X] upload"

Error Type 1:

Reading | Error while burning bootloader.
################################################## | 100% 0.05s

avrdude: Device signature = 0x1eXXXX
avrdude: Expected signature for ATmegaXXX is 1E XX XX
         Double check chip, or use -F to override this check.

That generally means that either you failed to disable the auto-reset on your ISP Arduino (see: Step 2) or your target processor is not the right type for the Arduino board you selected in Step 4.

Error Type 2:

avrdude: Device signature = 0x1e9406
avrdude: erasing chip
avrdude: reading input file "0x3F"
avrdude: writing lock (1 bytes):

Writing |  ***failed;  
################################################## | 100% 0.13s

avrdude: 1 bytes of lock written
avrdude: verifying lock memory against 0x3F:
avrdude: load data lock data from input file 0x3F:
avrdude: input file 0x3F contains 1 bytes
avrdude: reading on-chip lock data:

Error while burning bootloader.
Reading | ################################################## | 100% 0.02s

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
         0x00 != 0x3f
avrdude: verification error; content mismatch

That usually means that you failed to disable the auto-reset on your ISP Arduino (see: Step 2). The Arduino bootloader on your ISP Arduino speaks the same protocol as the ArduinoISP sketch. It doesn't, however, allow you to set the lock fuse byte and when asked to read that byte it always returns 0x00. If the ISP Arduino resets and happens to have the same model processor as the target (avoiding Error Type 1 above) the first thing to go wrong will be the read-back of the lock fuse byte. Go back to Step 2.

Error Type 3:

avrdude: Device signature = 0x000000
avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check..

This is a symptom of the target chip's clock not running. That almost never happens when burning to an Arduino board since the Arduino board has the necessary crystal or resonator. It is possible you have a chip with configuration fuses set to disable serial programming. To fix the fuses you will need something like the HV Rescue Shield 2 from MightyOhm (HV Rescue Shield 2 | MightyOhm). That uses High Voltage Serial Programming to reset your ATmega/ATtiny configuration fuses to factory defaults. If that doesn't work your ATmega/ATtiny is probably damaged beyond use.

Error Type 4:

avrdude: verifying ...
avrdude: 1 bytes of lock verified

avrdude done.  Thank you.

That's no error! That indicates SUCCESS!

Step 6: ALTERNATIVE
If all of this seems complicated (or you want to burn a bootloader on the MEGA) you should invest $5 or less on a USBasp or USBtinyISP from eBay. They will take a few weeks to arrive from the Far East but it saves a bunch of wiring. The USBasp is slightly cheaper but they seem to only come with 10-pin ICSP cables so they requires a 10-pin to 6-pin ICSP adapter to let you plug the 10-pin cable onto a 6-pin ICSP header. The USBtinyISP may come with 6-pin, 10-pin, neither or both cables.

For Arduino IDE earlier than version 1.6.6:

After opening File->Examples->ArduinoISP, before uploading to the programmer board edit the line:

#define RESET     SS

Change it to:

#define RESET     10

For all Arduino IDE versions:

The 10uF cap is not needed when using Leonardo-type ATmega32U4-based boards as a programmer, because they don't reset upon serial connection.