Arduino Mega 2560 won't upload

Hello all,

I am a student working on a project for a mechatronics course. We were issued two boards, an uno and a mega 2560, to build our robots with. The uno has been working like a champ. The mega, however, is not. Friday night it was working fine: I was able to upload code and work with it as normal. When I started working on it again Saturday morning, I could no longer upload to the board. I spent the better part of the day yesterday researching what could possibly be wrong to no avail.

To cut to the chase, here are the things I have tried:

  • I have uninstalled and reinstalled the board drivers two or three times
  • I have ensured that the correct board and com port have been selected each time I try to upload
  • I have removed all shield boards and other circuits before trying to upload
  • I have held reset on the board while trying to upload
  • I have pressed reset just prior to uploading
  • I have tried uploading on a different computer (my wife's mac with OSX vs my laptop with Windows 7 64 Home)
  • I have tried burning the bootloader through the arduino IDE
  • I downloaded the newest arduino IDE (I was using .022 previously)
  • We have an xbee wireless shield attached: when that is on, I have made sure that it is switched to "dline" and not "UART"
  • I have tried different USB cables and different USB ports on my computer
  • When I hold shift and click upload, I get avrdude: usbdev_open(): did not find any USB device "usb" as the error
  • I have tried uploading different sketches in case it didn't like my code for some reason, including "blink" from the examples library

I'm sure there are other things I have tried, but don't recall them at the moment.

I am fairly certain that the problem is software related, and not hardware (I could be wrong and will be the first to admit it if I am) because I am able to communicate serially between the two boards when the xbee shields are attached. To me that means that there is nothing wrong with the physical hardware that governs the serial communication: it just does not want to talk to any computers through the USB. It powers up when I plug it into the USB (the green power LED comes on, and the L LED flashes a couple of times) but when uploading, the TX and RX LEDs don't blink anymore.

I installed AVR studio last night because I read one post that said I could burn the bootloader using that setup instead. It also said that there is a conflict between the AVR studio's USB drivers and the drivers used by the arduino IDE. I haven't tried burning the bootloader with AVR studio because, quite frankly, I don't know how. I thought I'd check here before researching how to do it.

Anyway, there's my problem. Any help that anyone can give would be greatly appreciated.

Thanks,
Tyler

EDIT: Changed "AREF LED" to "L LED" (the L looked like a line pointing from AREF to the LED. yeah, dumb mistake :roll_eyes:)

dont know it it helps. i had problems uploading on my mega and it worked.

Thanks for the response. So the suggestion from the link you posted is recommending that I install 0023 and try it instead or transfer the tools folder from 0023 to the 1.0 folder. I tried uploading with 0023 and while it got stuck again, it did give a different verbose output:

Binary sketch size: 4492 bytes (of a 258048 byte maximum)
C:\Program Files (x86)\arduino-0023\hardware/tools/avr/bin/avrdude -CC:\Program Files (x86)\arduino-0023\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega2560 -cstk500v2 -P\.\COM3 -b115200 -D -Uflash:w:C:\Users\Tyler\AppData\Local\Temp\build4973189242677089310.tmp\sketch_feb21a.cpp.hex:i

avrdude: Version 5.4-arduino, compiled on Oct 11 2007 at 19:12:32
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

System wide configuration file is "C:\Program Files (x86)\arduino-0023\hardware/tools/avr/etc/avrdude.conf"

Using Port : \.\COM3
Using Programmer : stk500v2
Overriding Baud Rate : 115200
avrdude: ser_open(): setting dtr
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]
avrdude: Recv:
avrdude: stk500_2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]
avrdude: Recv:
avrdude: Recv:
avrdude: Recv:
avrdude: stk500_2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]
avrdude: ser_send(): write error: sorry no info avail

The final line is from me unplugging the board after no luck uploading.

So, no luck uploading, but it did give something else, so that's some progress :slight_smile:

This could have been the Mega 2560 problem with code that contains "!!!". See Google Code Archive - Long-term storage for Google Code Project Hosting..