USB to Serial Light Adapter to program ATMEGA2560 Chip problem

I am using the USB Serial Light Adapter (http://www.arduino.cc/en/Main/USBSerial) and the ATMEGA 2560 chip for a standalone project.

Currently I have the boot-loader uploaded to the chip via an Arduino Mega 2560 (from here on out I will call it the Programmer Board for simplicity). I first uploaded the correct isp software (in arduino environment -> file -> examples -> ArduinoISP) then connected programmer board pins 53 (slave reset), 51(MOSI), 50(MISO), 52(SCK), Ground, and 5v to chip pins RESET, 20(SCK), 21(MOSI), 22(MISO), any ground, and 5v respectively. This allowed me to upload the boot-loader to my ATMEGA 2560 chip without a problem.

Currently I have been programming my stand alone chip using the Arduino ISP (http://www.arduino.cc/en/Main/ArduinoISP) and following the instructions to hook it up to the SPI on the ATMEGA 2560 chip (pretty much the same way I wired up the programmer board). The reason I used the programmer board to upload the boot-loader is the Arduino ISP cannot handle the protocol for uploading the mega2560 boot-loader, but will program the chip just fine. However for my project to access the SPI lines I have to unplug things and it would be a lot simpler for my to just use the RX/TX serial lines to program the chip.

This is where my problem occurs.

I currently have the USB to Serial Light Adapter wired up to the chip in this order; GND -> chip GND, +5V -> chip 5V, TX -> chip RX (tried TX -> TX just in case, still same error), RX -> chip TX (tried RX -> chip RX just in case, still same error), and RESET -> chip RESET (however I wired a 100nf cap in series to the reset line, well I actually tried it both with the cap and without it, same error).

This is the error I get:

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

Now I get this error even if I have RX and TX backwards, as I stated earlier.

In my frustration I tried programming a regular Arduino Mega Board by just bypassing the on board USB to Serial adapter (pretty sure its the same as the USB to Serial Light Adapter - chip ATMEL MEGA 16u2) and using the standalone adapter. I have it wired up as so GND -> board GND, 5v -> board 5v, RESET -> board RESET, RX -> board TX, and TX -> board RX. I also tried it using the 100nf cap wired in series with the reset line, RX -> RX, TX -> TX; same error as before (timeout one).

I am not sure if you can just bypass the onboard USB to Serial adapter (works 100% fine) by not plugging in the USB cable and just plugging in the standalone adapter to RX 0 and TX 0, but figured I would try anyways.

My next idea is that something is wrong on the Arduino environment side. So i googled my problem and found out you have to download a driver for windows (I am using Windows 8.1 and Arduino 1.6.1). However when I went through control panel -> device manager -> Ports (COM & LPT) -> Arduino USB Serial Light Adapter (COM 8 ) -> update driver software, it says my drivers are up to date and does not install the driver I downloaded (says they are the same). However, in the Arduino environment; Tools -> Port -> COM 8 shows up, whereas if I have a mega board plugged in it shows Tools -> Port -> COM 3(Arduino Mega or Mega 2560) .

I guess my question is why is the USB to Serial Light Adapter timing out and is it due to not being recognized in the arduino environment or am I wiring something incorrectly?

Thanks a ton in advance, and if I figure out the problem myself I will post the answer for anyone else having my issue.

Chad Thomas

I don't know where the problem in your standalone setting is, but to program a regular Arduino Mega board with an external USB-to-serial adapter, you have to cut the RESET-EN trace on the board. Of course, then you cannot program the Arduino via the onboard USB port anymore.

See this thread: Programming Arduino Mega 2560 with external USB-to-serial adapter - Microcontrollers - Arduino Forum

Maybe this helps you in diagnosing the problem further.

Ah I was afraid I would have to cut a trace making the onboard USB port useless. Thanks for taking the time to answer that question and I feel bad that it was already answered, I should have looked harder haha.

After some more research I think the problem with my standalone ATMEGA 2560 chip is we changed the reset line a bit. It was nothing major, just added an IC Supervisor (http://www.digikey.com/product-detail/en/MCP809T-475I%2FTT/MCP809T-475I%2FTTTR-ND/275241), but im assuming it was enough to matter for programming the board via RX and TX (everything else works fine). I am going to have our board guy revert to the reset line that the Arduino Mega uses and hopefully that should fix the problem.

Ill keep this post updated once we have the new board, but if anyone else has any ideas on what my problem is, it would be greatly appreciated.

Once again, thanks miqe for your answer and pointing me towards the correct direction!

Chad Thomas