Pages: [1]   Go Down
Author Topic: ArduinoISP with Arduino mega 2560  (Read 1733 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 18
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

I have an Arduino Duemilanove loaded with the latest ArduinoISP code (from Arduino 021), I am trying to use it as a programmer for my new Arduino Mega 2560. I am using avrdude directly (well from Eclipse, so I can change the parameters). The upload is actually going fine (see the log). The problem is that the software does not seem to run after upload.

I am thinking this might have to do with the flash size because I found this link: http://www.cbxdragbike.com/arduino/new/ (but he is talking about the bootloader). Maybe the ArduinoISP software needs an update to STK500v2 for larger flash sizes? If so I would definitely like to try and upgrade the code, but as I am still an Arduino rookie, input is appreciated on whether this could actually be the problem.

I have pin 10 of the Duemilanove connected to the reset pin on the Mega. Pin 11, 12 and 13 on the Duemilanove are connected to resp. 51, 50, 52. The reset pin on the Duemilanove is connected (through a 120 ohm resistor) to 5V. Both boards use the same Duemilanove it's power supply.

I have used these tutorials:
http://arduino.cc/en/Tutorial/ArduinoISP
http://www.arduino.cc/playground/Main/DisablingAutoResetOnSerialConnection

The log of the upload:

Code:
Launching C:\WinAVR-20100110\bin\avrdude -pm2560 -carduino -PCOM3 -b19200 -Uflash:w:Blink.hex:a
Output:

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.03s

avrdude: Device signature = 0x1e9801
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "Blink.hex"
avrdude: input file Blink.hex auto detected as Intel Hex
avrdude: writing flash (1850 bytes):

Writing | ################################################## | 100% 1.91s

avrdude: 1850 bytes of flash written
avrdude: verifying flash memory against Blink.hex:
avrdude: load data flash data from input file Blink.hex:
avrdude: input file Blink.hex auto detected as Intel Hex
avrdude: input file Blink.hex contains 1850 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 1.59s

avrdude: verifying ...
avrdude: 1850 bytes of flash verified

avrdude done.  Thank you.

avrdude finished
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 18
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Just tried to use the Duemilanove to program an Arduino Pro Mini (328), works like a charm.

So a bit more suspicious now towards to Mega 2560 which by the way is hardware-wise oke, I have used it already from the Arduino IDE.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 4
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi!

I'm Arduino rookie. And I stuck with bootloader flashing into my new Arduino ATMega2560. Please check my thread: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1279287827 - your help will be VERY appreciated.

Thanks in advance, people!!
Logged

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 9
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

It's definitely possible that the ArduinoISP sketch has troubles programming the Mega 2560.  The chip with more than 128 KB memory have slightly different behavior in certain respects because you can't fit memory addresses in 16 bits any more (they're word addresses, so 2^16 = 65536 is 128 KB).  You should probably add this to the Google Code issue list: http://code.google.com/p/arduino/issues/list
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 18
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks Mellos, I have created an issue: http://code.google.com/p/arduino/issues/detail?id=388&can=4.

In the mean time I had ordered an Olimex AVR 500 and it is uploading correctly, probably because it is talking stk500v2.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 2
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have purchasee a new mega 2560.  Running under Vista with NOTHING connected to the mega.  

I have try to run the examples programs, such as Fade.  The program compiles, but will not download to the mega 2560.  

The green light is on

I get the following error message.


avrdude: stk500v2_command(): unknown status 0x01
avrdude: stk500v2_disable(): failed to leave programming mode


I have disconnect and reconnected the mega.  The red led blinks on and off then out, but the green led stays on.

I have push the reset button after the program compiles.

I have uninstalled the software and reinstalled.

Help

Logged

Pages: [1]   Go Up
Jump to: