My Arduino Mega 2560 is driving me crazy. Windows 7 is able to see the board in Device Manager, it is connected in COM4.
But I'm not able to upload sketches into it because i keep receiving this error:
Sketch uses 1,518 bytes (0%) of program storage space. Maximum is 253,952 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 8,183 bytes for local variables. Maximum is 8,192 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
At first i thought it was a bootloader problem, so i've bought this little programmer, i've installed the drivers and it is correctly recognize in Device Manager. In the IDE i've selected the COM4 port where Arduino is connected, I've plugged in the ISP in the board, and i've selected ArduinoISP in the programmer menu. I've tryed to burn the bootloader and i receive this error.
Arduino: 1.6.5 (Windows 7), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x03
This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.
I have no ideas what's the problem with this board, please help me!
The ATmega2560 is a older chip, and it likes to run at 5V. If your USB power is weak, it might cause trouble.
Could you measure the 5V pin ? It should not be 4.5V or lower.
Is your Arduino Mega 2560 board a recent version ?
The bootloader was improved 1 or 2 years ago.
You could have bought an Arduino Uno and use the Arduino Uno as programmer (ArduinoISP).
Does the Arduino IDE recognize the board ? In the menu, where the port is selected.
Are you sure it is COM4, or are there other things connected or inside the computer ?
Because of all these problems, I suggest to try it on an other computer with other USB cables.
I'm using the Mega 2560 rev 3. The board is 1.5 years old, last year i've mainly used it to upload sketches into the Arduino Mini.
I've always used the same usb cable to connect the 2560 to the pc, never had any problem. I've checked the voltage on 5V pin, i've got 4.49-4.5V.
I've tryed to connect it to a different pc, with a different cable, still i'm getting the same errors.
The IDE is able to recognize the board!
That is a little bit of everything: voltage might be too low, bootloader might be too old, board might be broken. Can you fix it step by step ?
Remove everything that is connected to the pins.
That voltage is too low. You really have to fix that before trying something else.
A wall wart of 7.5 ... 9V to the power jack should result in 5.0V at the 5V pin.
Could you update the bootloader ?
You need a programmer and the newest Arduino IDE. In the menu is an option to burn the bootloader.
Don't try to update the bootloader with 4.5V.
If that didn't help, perhaps the Mega is broken, since it worked before. Perhaps there is something wrong with the usb-serial chip, or something else.
Don't try to update the bootloader with 4.5V.
Why not?
From Datasheet:
"ATmega2560/ATmega2561:
• 0 - 16MHz @ 4.5V - 5.5V"
I have bootloaded '2560's using 3xAA battery pack for power and a Atmel AVR ISP MKii programmer (which only monitors the power level).
so the voltage readings of 5V pin are:
- 4.51-4.53V when connected with USB cable
- 5.04-5.05V when plugged with a power adapter.
But I don't think it's a USB problem. As I told you before, last time i've used the 2560, I was (probably) using it to upload a sketch into the Arduino Mini (ATmega328).
Today i've acquired a USB2Serial Adapter, i've tryed to upload a sketch to the Mini, but i keep getting this error:
avrdude: Version 6.0.1, compiled on Apr 15 2015 at 19:59:58
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch
System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"
Using Port : COM6
Using Programmer : arduino
Overriding Baud Rate : 115200
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xd9
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0xd9
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0xd9
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0xd9
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0xd9
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0xd9
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0xd9
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0xd9
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0xd9
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xd9
avrdude done. Thank you.
Problem uploading to board.
And the resp=0xXX changes everytime i try to upload something.
So I think the problem on the Mega and the problem on the Mini are strictly connected.
The USB2Serial Adapter works fine, i've tryed to upload blink to the old Mega1280 and it worked.
Try to update the bootloader.
I've tryed to burn the bootloader with this Arduino ISP, but it is not working. Don't know if it's a driver problem: i've installed the drivers found in that page. I'm using Win7 x64.
You have very bad luck !
Do you have an Arduino Uno (to use it as an programmer) or a USBasp version 2 ?
On this page is a link to fixed drivers for Windows 7 64-bit : http://fab.cba.mit.edu/content/projects/fabisp/
That is worth trying. It is the file "usbtinyisp_libusb-win32_1.2.1.0.zip".
When an Arduino board is recognized by the computer as serial port, that means that the usb-serial chip is working. When uploading fails, it could be a damaged bootloader (or faulty crystal, or damaged Arduino). Maybe in 30% of such situations burning the bootloader helps.
Can you try another USB cable? A bad USB cable can cause problems like this.
I've completely removed the drivers of the ArduinoISP, and re-installed it. Now i'm able to upload a sketch to the Mega 2560 through the programmer. But if i try to burn the bootloader i receive this error:
EDIT: since the length of the message would be greater than 9000 characters, i have put the error message in the attachment file.
output.txt (9.34 KB)
So everything is going well, until the written boot code is verifyed and that is wrong.
Perhaps the ATmega2560 chip is damaged after all. It could be a bad flash in the bootloader section. I have never heard of that before, and I think it is even unlikely.
To be sure about that, it should be tested with another Mega board.
What do you mean "tested with another Mega"? I can borrow one from a friend of mine...
Does he have a programmer ? Or an Arduino Uno to be used as ArduinoISP ?
Ask him if he can burn the bootloader to his Mega board.
If that works (of course it works), ask him to burn the bootloader to your Mega board.
If he doesn't have a programmer, try your ArduinoISPboard with his Mega board.
Ok, so i've managed to get a working Arduino Mega 2560 board, and i've been succesfull at burning the bootloader into my 2560 board. Unfortunately i'm not able to upload any sketches to the board when using the USB cable. I keep getting this error.
avrdude: Version 6.0.1, compiled on Apr 15 2015 at 19:59:58
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch
System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"
Using Port : COM3
Using Programmer : wiring
Overriding Baud Rate : 115200
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
avrdude done. Thank you.
If i upload the sketch ASCIITable (using the ArduinoISP programmer) and i open the serial monitor, i'm not receiving any data. Indeed the TX and RX leds on my Mega 2560 are not flashing.
At this point I think there may be a problem with the communication chip of the board.
I'm certain it is not a USB cable (or USB slot) problem, since i'm perfectly able to send and receive data with my friend's Mega 2560.
Your friends Mega 2560 is all okay ? You can upload sketched and they work ?
You were able to use a programmer and burn the bootloader into your Mega board. Well done. It's sad to hear that it didn't help a lot.
When you upload a sketch with the programmer, the bootloader is removed. That sketch runs without bootloader.
You have to burn the bootloader again after that, to upload sketches in a normal way.
The communication chip is the ATmega16U2 used as usb-serial converter. That chip has firmware, which is in the Arduino folder somewhere. If that chip is not working, the computer would not see the serial port at all.
That usb-serial chip could be wrong, or the RX and TX pin of the ATmega2560 are damaged, or the pcb connections between the usb-serial chip and the ATmega2560 are broken.
If burning the bootloader again didn't help, then you might need to buy another Arduino board.
Some burn the firmware in the ATmega16U2 chip to be sure that is okay, but as far as I can remember, I never had to do that.
Windows 10 64bit,
Board: MEGA 2560 from SainSmart,
Arduino IDE 1.8.8,
Board Selection: Arduino/Genuino MEGA or MEGA 2560
Programmer: AVRISP mkll
Port: COM3 (Arduino/Genuino MEGA or MEGA 2560)
Cant load Blink Sketch......
If you can recognize the port and get the boar info, does that mean the connection to the board is confirmed?
If the Yellow on board LED is blinking, does that mean the bootloader is present and controlling some of the board hardware?
If those two are confirmed, what else is left?
The bootloader is not responding to the incoming request to dump the serial data stream into the PROM. EPROM or EEPROM, whatever static memory is on this board.
I'm thinking, the board is faulty. Can I test anything else?