Arduino Mega 1280 bootlader reinstall with an other Arduino

I have a Mega 1280 compatible Freeduino Epic. Since I cannot upload any sketches to it I need to reinstall the bootloader. I haven't found much info how to do that. Most Mega related articles describe how to use the Mega as a programmer, not as a target. I want to use a Duemilanove as a programmer. Any ideas would be appreciated!

I followed the wiring described here [Wiring for Mega2560 and similar](http://Wiring for Mega2560 and similar) but the IDE gives me this error:

avrdude: Version 5.11, compiled on Sep 2 2011 at 18:52:52

  • Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/*
  • Copyright (c) 2007-2009 Joerg Wunsch*
  • System wide configuration file is "/Applications/Arduino 2.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf"*
  • User configuration file is "/Users/alkopop79/.avrduderc"*
  • User configuration file does not exist or is not a regular file, skipping*
  • Using Port : usb*
  • Using Programmer : stk500v2*
    avrdude: usbdev_open(): did not find any USB device "usb"

Needless to say, the Duemilanove has the 'Arduino ISP' sketch uploaded and then the board set to Mega 1280 in the IDE's menu. Any ideas?

Silly me, I haven't set the Programmer to 'Arduino as ISP'. I set it then I got this error message:

avrdude: Version 5.11, compiled on Sep 2 2011 at 18:52:52

  • Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/*
  • Copyright (c) 2007-2009 Joerg Wunsch*
  • System wide configuration file is "/Applications/Arduino 2.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf"*
  • User configuration file is "/Users/alkopop79/.avrduderc"*
  • User configuration file does not exist or is not a regular file, skipping*
  • Using Port : /dev/tty.usbserial-A9007KZM*
  • Using Programmer : stk500v1*
  • Overriding Baud Rate : 19200*
    avrdude: Send: 0 [30] [20]
    avrdude: Send: 0 [30] [20]
    avrdude: Send: 0 [30] [20]
    avrdude: Recv: . [15]
    avrdude: stk500_getsync(): not in sync: resp=0x15
    avrdude done. Thank you.

What am I doing wrong?

Try NickGammon's code/approach

1280 is same as 2560, 1/2 the memory.

Tried, still get error:

[avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
](http://avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding)

Success, thank you!

Whatd' you do different? Learn & share here.

Read the whole post... embarrassing. But basically this is the solution:

  • wire the programmer and the Mega (or in this case the Freeduino Epic) like this:

Programmer Mega
D10 (SS) Reset
D11 (MOSI) D51
D12 (MISO) D50
D13 (SCK) D52
Gnd Gnd
+5V +5V

Taraaaaa! That's it! Special thanks to Nick Gammon for the excellent post and the sketch!

alkopop79:
Read the whole post... embarrassing. But basically this is the solution:

  • wire the programmer and the Mega (or in this case the Freeduino Epic) like this:

Programmer Mega
D10 (SS) Reset
D11 (MOSI) D51
D12 (MISO) D50
D13 (SCK) D52
Gnd Gnd
+5V +5V

I don't understand the above step, I though that nicks sketch running on the programmer figures out what kind of board it's wired to via reading signature bytes from the target board? , what does the IDE have to do with the burning process at this time that would require the target board type to be selected in the IDE? Lefty

  • open the serial monitor, type 'g' and hit Enter

Taraaaaa! That's it! Special thanks to Nick Gammon for the excellent post and the sketch!