Go Down

Topic: Arduino Mega 1280 bootlader reinstall with an other Arduino (Read 659 times) previous topic - next topic

alkopop79

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!

alkopop79

I followed the wiring described here 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?

alkopop79

#2
Nov 20, 2012, 09:42 pm Last Edit: Nov 20, 2012, 09:44 pm by alkopop79 Reason: 1
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?

CrossRoads

Try NickGammon's code/approach
http://www.gammon.com.au/forum/?id=11635
1280 is same as 2560, 1/2 the memory.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.


alkopop79


CrossRoads

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

alkopop79

#7
Nov 21, 2012, 03:06 am Last Edit: Nov 21, 2012, 03:08 am by alkopop79 Reason: 1
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


- download the sketch from here: http://gammon.com.au/Arduino/Atmega_Board_Programmer.zip and upload it to the programmer Arduino

- set the Tools/Boards the target to Mega (1280 in my case)

- 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!

retrolefty


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


- download the sketch from here: http://gammon.com.au/Arduino/Atmega_Board_Programmer.zip and upload it to the programmer Arduino

- set the Tools/Boards the target to Mega (1280 in my case)

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!


Go Up