Go Down

Topic: Just got a new Mega 2560 - full of hope, but fail :( (Read 2171 times) previous topic - next topic

Melbfella

Jan 03, 2013, 12:19 pm Last Edit: Jan 03, 2013, 01:19 pm by Melbfella Reason: 1
Hi All,

I see this topic covered over and over, but just can't find a distinct solution to my issue.  If there are threads out there that cover my issue precisely, please let me know.

I have just grabbed a Mega2560R3, as I've outgrown the ports available to me on a standard Uno (yay! red letter day in the name of prototyping ;) )

However, I simply can't upload to this thing.   I gives me a timeout error, and little else.

I have tried toggling between the stk5002 and the wiring compilers (per google suggestions), but just cannot get this darn thing to work.

Any and all thoughts are appreciated.

Thanks in advance,

Doug.

spycatcher2k

When you try to upload with the arduino ide, what error message do you get? is the board an official one? Have you installed the correct drivers? have you tried a different usb port/cable?
Drew.
http://www.uk-pcb.co.uk - My UK Based PCB Fab & Assembly Company
Design work undertaken
SMD & Thru-Hole assembly

Melbfella

Hi Spycatcher,

Thanks for your rapid response.

I do believe it is a geniune board, and I had used the same cable that works prefectly with my Uno.  However, after reading your post, a second and third cable have produced the same results.

The error message is :

avrdude: stk500v2_ReceiveMessage(): timout

Thanks for your time in considering my problem.

Best regards,

Doug.



spycatcher2k

I assume you have tried a loopback test?
if not, try that first.
OK - try this :
(Make sure you have the correct board & com port selected)
& make sure your board is not laying on top of something metal (I've been caught by this one)

Press upload on the ide
when the sketch size comes up, tap the reset button on the mega
if this works, then its probably the reset cap is faulty

if not - it may be the bootloader is faulty - do a search for using your UNO as an ISP,
try re-uploading the bootloader, If it's still faulty, I recommend arranging for a replacment
from your supplier.

Drew.
http://www.uk-pcb.co.uk - My UK Based PCB Fab & Assembly Company
Design work undertaken
SMD & Thru-Hole assembly

Melbfella

#4
Jan 03, 2013, 03:21 pm Last Edit: Jan 03, 2013, 03:26 pm by Melbfella Reason: 1
Hi Drew,

No I haven't tried a 'loopback test' am looking it up on Google now, and will let you know the results.

Thanks heaps for your help.

Best Regards,

Doug.

Melbfella

#5
Jan 03, 2013, 03:25 pm Last Edit: Jan 03, 2013, 03:28 pm by Melbfella Reason: 1
Hi again Drew,

I can't find anything relevant on Google with the search 'loopback test arduino mega 2560'.

Would you mind pointing me in the right direction for advice on how to perform a loopback test?

thanks again,

Doug.

codlink

Coding Badly has a great tutorial on it.

http://arduino.cc/forum/index.php/topic,73748.0.html
//LiNK

KeithRB

You have told the IDE that you are using the Mega and not the UNO, right?

oric_dan

I had the same problem, seems the drivers didn't get installed properly. See the
following threads,

http://arduino.cc/forum/index.php/topic,135878.0.html
http://arduino.cc/forum/index.php/topic,133030.0.html

Melbfella

#9
Jan 03, 2013, 11:45 pm Last Edit: Jan 03, 2013, 11:54 pm by Melbfella Reason: 1
Hi folks,

Thanks so much for your replies.

I've now tried the following things :

Confirmed that the IDE is pointed at the correct board.
Performed a loopback test - worked fine.
Tried pressing reset when the sketch size shows in the compiler - same result, timeout error.

The only suggestion I haven't tried is reinstalling the bootloader - I'm a bit nervous about doing this, so would like to explore any other possible solutions before going to this step.

I should also mention that the Mega seems to have installed correctly - it appears in control panel on Com 10 as 'Arduino Mega 2560 R3 (COM10)', and makes the familiar 'USB device plugged in' sound when plugged into my PC.

Please, if anyone has any other ideas as to how I can get this rotten board to work, I'd appreciate hearing them.

Thanks in advance.

oric_dan

I haven't worked with the Mega bd a lot, but when I plug it into the USB port,
the red ON Led comes on, and upload a sketch to it, the green RX,TX Leds
blink like crazy. Are you getting that?

Melbfella

#11
Jan 04, 2013, 06:08 am Last Edit: Jan 04, 2013, 07:22 am by Melbfella Reason: 1
Hi oric_dan,

When I plug the Mega in, the red 'On' LED is lit, and the led connected to Pin13 is flashing (looks like it has the blink tutorial loaded).

When I attempt to upload, the tx/rx lights flash just once as the compiler tries to address the board, then just sits there giving timeout messages, with no further flashing of the tx/rx lights.

On my Uno and the Nano, the tx/rx lights flash furiously during upload as you describe.

Cheers,

Doug.

oric_dan

Since the Rx,Tx Leds blink, it sounds like you have a valid comms link. The one problem
I can think of is maybe in the IDE between R3 and non-R3 versions of the board, but I'm
really in the dark when it comes to getting all these different board versions to work.

In any case, you would be better with these questions in the "Installation & Troubleshooting"
section. I'll try and direct some traffic over here, :(.


tim7

Hi Melbfella,
As far as I can tell from the bootloader code, the Mega should flash its yellow "L" LED rapidly 3 times whenever it is reset (as the Uno does).  Does yours do this when you press the reset button?  Does it also do it when you attempt to upload a sketch?

retrolefty

#14
Jan 05, 2013, 12:59 am Last Edit: Jan 05, 2013, 01:01 am by retrolefty Reason: 1
Quote
I have tried toggling between the stk5002 and the wiring compilers (per google suggestions), but just cannot get this darn thing to work.


This statement concerns me a little. Based on what does work (loop back) and what doesn't work (uploading) it would seem that the problem has to be one of the following in no specific order:

Defective mega2560 chip
bad bootloader
Bad IDE installation

And this last could be the result of whatever google suggestion you did. If it was my setup I would first just try and reinstall the arduino IDE first.

If that doesn't work I would then use your Uno board running the arduinoISP sketct (or even better and simpler Nick's great sketch and instructions ( http://www.gammon.com.au/forum/?id=11635 ) and attempt to burn a new bootloader onto the mega2560 chip.

Lefty


Go Up