Issue uploading anything to mega2560 R3

So i have been working with arduino boards for a while, though never a mega until the last few months. Long story short i can upload anything to, 2 separate mega 2560 R3 boards. I was able to for a while on many different computers then after about a month one kept having this error pop up during the upload process. "avrdude: stk500v2_ReceiveMessage(): timeout". I had a second board that i wasn't using so i set the one giving me issues aside and moved on to the other board. and for about a week it worked just fine with different programs and then it started to do the same. Now i have 2 separate boards that don't work, and i think i have tried most trouble shooting methods for this issue. Yes i know this a common issue but i still haven't found a solution to my problem but i will say what i have tried so far.

  1. Its not a programming issue, ive tried my code and example code and nothing will load on to the boards.

  2. I don't think its an hardware issue either, ive tried different computers, different cords, with power adapters and without, and many more possibilities.

  3. Probably not my drivers ive tried reinstalling them dozens of times, and in the past the exact same set up worked, nothing changed computer on the computer just the board stopped working.

  4. Firmware, and this is where it becomes more muddled to me, i have not tried reloading boot loader for many reasons, but I don't believe that is the issue based off how the tx rx pins are responding. So i also saw a solution that had you connect the tx and rx pins and see if in the serial monitor would mirror your sent data. This did not work for me, the rx led would flash but nothing more then that when i sent information. The suggestion there said to try to reload the ATmelmega16u2 firmware back on the device by using flip. I tried this and could not get flip to ever detect my device even after resetting the board by connecting the ground and reset pins together for a short period of time.

So that's where i am at, if i missing something please let me know. I have tried for about a week reading forums and trying things my self in order to get these boards to work, as a result ive tried so many things now it would take much more time then i care to spend to type them all out.

Do you have a string constant containing 3 consecutive exclamation points? ("!!!")

Due to a bug in the bootloader, this used to break uploads (the !!! pattern would put it into some debugging mode - even if the !!! was part of the data it was writing to the board). The official bootloader was long-since fixed, but clones are still shipping with the old version.

Have you checked using very simple sketches like blink, to rule out things like that?

I'd be inclined to try reburning the bootloader (using an appropriate ISP programmer - not all of them support the atmega2560, due to the larger memory size)

I too am unable to upload to my mega2560. Earlier in the week it uploaded to fine but today nothing. I'm also having issues with my UNO.

N_Vallo: I too am unable to upload to my mega2560. Earlier in the week it uploaded to fine but today nothing. I'm also having issues with my UNO.

Unless you are getting the same exact errors that this poster is getting (which is impossible to know, as he hasn't posted them), put it into a new thread - it causes a lot of pain for all involved when we're trying to help two people with different problems in the same thread. And post the full contents of any and all error messages.

Actually, OP of this thread should post that too - full text of any and all error messages.

Yes i have tried using other programs besides the one i have written including blink. I went ahhead and tried again uploading "blink" the example program on to the board just so i can post the errors it shows.

Sketch uses 1,554 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

You don't have anything connected to pins 0 or 1 do you? That will prevent uploads from working.

Do loopback test to make sure the serial converter is still working, as a sanity check.

The next step I'd take is reburning bootloader (using an ISP programmer - that's a piece of hardware; you can get USBAsps for a few bucks on ebay) - there's lots of information about the process available online.

currently i do not have anything connected in pins 0 or 1. If by loop back you mean connect pins 0 and 1 together and then send information through serial monitor and see if you get back what you sent, then i have done that. It did not work.

So i found a more detailed version of the loop back test, and got that to work with no issue. I wasn't grounding the reset properly(i was using a bad jumper previously), so now that the loop back works i'm thinking it must be something to do with the boot loader. im waiting on an isp programmer to come in, i couldn't source one locally so i have to wait till monday for any further troubleshooting.

So oddly i tried reloading a sketch to one of the boards after doing the loop back test, and it started working again. I haven't tried both boards yet but i will try the other tomorrow, anyone have any clue on why now it started working? Is there a way to check what bootloader i have and if there is something wrong with it without having the isp programmer in yet? (besides the arduino to arduino method for isp programming)