Mega2560: timeout communicating with programmer

Yes aquateen

maybe you are right. I didn't think to power problems, but if I simply remove the WizNet, the Mega uploads.

Mega needs external power ? just say it!

Dritan

HI,

i had have the same problem, but i used a external power (13V/625mA) to mega, but it was not enough to transfer reliable program code to mega+ethertsheeld, so i changed it to a 12V/1,6A powersupply and it will work fine.

I had the exact same problem and all I had to do was re-install the drivers which the Arduino spoon feeds you how to do if you google "how to install Arduino drivers". After that, I closed out all of the Arduino sketches, unplugged the board from my PC, plugged it back in and opened a new sketch. Last, make sure all of your connections from your Arduino Mega 2560 to the other device (I'm using a Kangaroo x2 motion controller) are correct. I was using the wrong pins which resulted in a bad connection and the error message "avrdude: stk500v2_getsync(): timeout communicating with programmer".

Hope this helps!

I've been having this same problem. I tried unplugging the mega then plugging it back in, my drivers are up to date, modifying the boards.txt, there are no !!! in my code. It just will not work.

Has anyone found a solution to this issue?

My son and I are trying to get the EvilMadScientist Peggy board working. It's got an Arduino Mega2560 on it. We programmed it successfully a few months ago, and it's still running the program we put into it (e.g., the chip and the board all function just fine).

Whenever we try to upload a new program (our Peggy program, blink, anything...) we get the message: avrdude: stk500v2_getsync(): timeout communicating with programmer This repeats a few times then it times out.

I have a Mac (OSX 10.10.5), my son has a PC with Windows 10. But we've also tried this with a Mac with OSX 10.9.5. We've also tried to upload a simple blink program to a Sainsmart Mega2560 board. Same problem, same error message every time!

There are lots of solutions out there, including - Editing boards.txt to change the AVR (some say to change it to -wiring, some say to use -stk500v2). - Pressing the reset button just before trying to upload the program - Unplugging the board, then plugging it in right before uploading. - Using AVR ISP instead of AVRISP MKII - Searching for and removing triple !!! in the code.

None of those worked for us.

We have the same problem with a Arduino Duemilanova. But we are able to upload programs to an Arduino Nano and Arduino Uno with no problem.

Has anyone solved this?

Many thanks!

I must explain how I fix the problem.

I use following model or version: Arduino 1.0.6 Arduino Mega Windows 7 With and without external power supply though power jack

I have been using the same computer, USB cable, Mega board. Even the computer is located in my research field, so it cannot be updated, upgraded, or changed anything. But suddenly, last week, I had the exact same problem. When I hit the uploading button, it gives a lot of red overtime error message with 'Done Uploading' although it doesn't upload anything. Very frustrated.

I brought the computer back to my office and connected new cable and brand new Arduino Mega board. I couldn't upload anything. So I found this thread and followed each instruction. Fortunately, I found my solution fast.

When I try to connect and upload a code, my computer automatically chooses Port10. It has been always using Port10. So, I didn't really give any attention to the port number. But when I go to Control Panel --> Device Manager --> Port, I found that there is 'Arduino Mega (2560) COM7'.

So, I go back to Arduino IDE and change the port number to COM7. Then, it works.

I really hope it helps someone.

found solution from below...

http://stackoverflow.com/questions/21582172/arduino-upload-timeout-error

For me the solution was to power my Rumba board with usb power and not stand alone.

This makes no sense -.- I'm using a standalone Arduino IDE (V1.6.6) and it works fine on my windows vista computer. If I plug the same arduino using same IDE into my other computer, it uploads once and then gives the timeout error. If I unplug the arduino and close IDE, plug it back in and relaunch I can upload one more time. This is a ridiculous approach to programming the board- why on earth does it get "locked out" every time it uploads something?

I had the same problem using the Arduino IDE V1.6.7 (and Windows XP). I found a very easy fix. The wrong Com port was listed in the IDE. In earlier versions of the IDE, if the board was not found, Tools>Port would be greyed out.

After trying and failing to do the upload, I went to Tools>Port in the IDE and "COM1" was selected (not greyed out). But the board wasn't connected to COM1, so no upload. To the right of COM1, I clicked on the right-pointing arrow to list all the COM ports--and there listed next to COM8 is my Mega board. After I selected it, the upload worked fine.

So be sure your board (and not just a COM port) is shown under Tools>Port in the IDE if you are having this problem.

Well, since this problem today also hit my table...

Today got my first Mega2560 clone board (CH340G USB Chip) since the code got too large for the Uno. I encountered the same timeout-error using the clone with a MacBook Air and the latest Arduino IDE, never had timeouts while uploading programs to my Nano or Uno clones before. Like always I simply plugged in the USB-cable, the power LED on the board came on, and when the upload started the RX TX LED shortly flashed before staying off the rest of the "upload"-time.

I started reading, tried all different solutions, got frustrated and then read a very simple suggestion...

Get another USB-cable!

After all the other hints didn't work out for me (sorry little reset-button) and so much time was already wasted I searched my cable-storage, grabbed another USB-cable and... problem solved immediately! I didn't try it again with the first one, just discarded it (although it still works with Uno boards). >:(

Sometimes life can be so easy.

Setup: Windows 10 64-bit Keyestudio MEGA 2560 port com7 (changed from com3 per suggestions - said it was available too) IDE: 1.8.0 Tried different USB ports (only have three)

errors: Sketch uses 1456 bytes (0%) of program storage space. Maximum is 253952 bytes. Global variables use 33 bytes (0%) of dynamic memory, leaving 8159 bytes for local variables. Maximum is 8192 bytes. avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_getsync(): timeout communicating with programmer An error occurred while uploading the sketch

Was working great until the 4th when I got a BSOD.

No viruses/malware/spyware found by malwarebytes/superantispyware SFC found nothing

Compile/upload progress bar goes to end of bar then nothing for about 45 seconds.

I've tried reinstalling the IDE I've tried using IDE 1.6.13

boards.txt mega 2560 entries:

mega.name=Arduino/Genuino Mega or Mega 2560

mega.vid.0=0x2341 mega.pid.0=0x0010 mega.vid.1=0x2341 mega.pid.1=0x0042 mega.vid.2=0x2A03 mega.pid.2=0x0010 mega.vid.3=0x2A03 mega.pid.3=0x0042 mega.vid.4=0x2341 mega.pid.4=0x0210 mega.vid.5=0x2341 mega.pid.5=0x0242

mega.upload.tool=avrdude mega.upload.maximum_data_size=8192

mega.bootloader.tool=avrdude mega.bootloader.low_fuses=0xFF mega.bootloader.unlock_bits=0x3F mega.bootloader.lock_bits=0x0F

mega.build.f_cpu=16000000L mega.build.core=arduino mega.build.variant=mega

default board may be overridden by the cpu menu

mega.build.board=AVR_MEGA2560

Arduino/Genuino Mega w/ ATmega2560

-------------------------

mega.menu.cpu.atmega2560=ATmega2560 (Mega 2560)

mega.menu.cpu.atmega2560.upload.protocol=wiring mega.menu.cpu.atmega2560.upload.maximum_size=253952 mega.menu.cpu.atmega2560.upload.speed=115200

mega.menu.cpu.atmega2560.bootloader.high_fuses=0xD8 mega.menu.cpu.atmega2560.bootloader.extended_fuses=0xFD mega.menu.cpu.atmega2560.bootloader.file=stk500v2/stk500boot_v2_mega2560.hex

mega.menu.cpu.atmega2560.build.mcu=atmega2560 mega.menu.cpu.atmega2560.build.board=AVR_MEGA2560

Any changes here?

Maybe I'll try the windows installer 1.8.0 next. Nope :(

Sketch uses 1456 bytes (0%) of program storage space. Maximum is 253952 bytes. Global variables use 33 bytes (0%) of dynamic memory, leaving 8159 bytes for local variables. Maximum is 8192 bytes. avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_getsync(): timeout communicating with programmer An error occurred while uploading the sketch

Any ideas?

I have decided that My mega 2560 is shot. I've tried programming it on a different computer with the same results. New mega coming.

[quote author=Louis Davis link=msg=1019023 date=1354573405] You may be experiencing the "!!!" problem.

The original bootloader would us !!! as an escape sequence to enter a special mode.

If !!! , three or more exclamation point in a row are received during the bootload it will enter that mode and will no longer respond to bootload commands.

If you have entered any strings with !!! then you can remove them and this should fix your problem. [/quote]

I just ran into this issue yesterday. (It's Mar 10, 2017 BTW) My sketch would upload to about 98% and fail. I did make a change to the sketch (adding a message with !!! at the end of it, unaware of the bug) Thankfully I came across this post and removed the !!! - who would have thought that would be a problem.

So if I understand right this is a problem with the firmware/bootloader on the board? Are you aware if they (Arduino) ever fixed it? and if so what is needed to update the firmware on the board? Thanks

I ran into this problem right out of the gate today. I've been using an Uno but switched over to my new Mega2560 unit. I tried to run the same code and got the same message as you. After looking through the comments I almost gave up. I noticed in my tools that I changed my board and processor, but not my port. Once all of my names matched the Mega2560 I was back in business.

I had the same problem and the fault is the mega card touching by the USB, the lcd8448 reset button. Just keep lifting the two cards

Post 6 worked for me!

Fantastic, I have lost count of how many hours I spent trying to figure this out. But this post brought me light in the end of the tunnel and removing the damn “!!!” I finally managed to flash my mega2560.

God bless you brother! Many thanks!

I tried everything here and still no luck. I strongly suspect it is the foul play of FTDI's windows drivers that broke my Arduino :slightly_frowning_face:

See this article: https://hackaday.com/2016/02/01/ftdi-drivers-break-fake-chips-again/

If the Arduino Mega 2560 you bought was cheaper than usual or from banggood.com, dont interface with it using Windows because the Windows FTDI drivers it uses for the FTDI USB interface intentionally brick your Arduino by frying your fake FTDI chip! :slightly_frowning_face: Its a very unfair tactic of FTDI to surreptitiously punish the end-user because there is a fake version of their product being manufactured.

Ive always hated Windows for this sort of behaviour but now I h8 FTDI too! :angry:

There is a howto where you can buy a genuine FTDI chip and replace it on the board, thus salvaging your Arduino: https://hackaday.com/2017/03/07/fixing-fake-ftdis/

There is more info on this issue here: https://forum.arduino.cc/index.php?topic=274359.0

Muchas gracias por la ayuda, el error que cometí fue incorporar en el scketch “ !!! ”, y no podía volver a cargar ni ver por monitor serie, reinicie la PC, desconecte y no se resolvía, hasta que después de varios intentos pude cargar el scketch corregido. Un cordial saludo desde Mar del Plata, Argentina.

Thank you very much for the help, the mistake I made was to incorporate into the scketch "!!! ", And I could not reload or watch by serial monitor, restart the PC, disconnect and it was not solved, until after several attempts I could load the corrected scketch. Warm regards from Mar del Plata, Argentina.