Hi,
Our requirement is to program an Atmega 2560 (Atmel 2560 controller) from a UNO having 16U2 controller. We have removed the Atmega328p controller on an UNO board and we have connected UNO board TX and RX pins to the Atmega Mega board TX-RX pins.
Our objective is to program the MEGA 2560 controller using the UNO 16U2 controller which acts as a USB to UART programming bridge.
We have connected TX pin of UNO to RX pin of Mega and RX pin of UNO to TX pin of Mega.
We have upgraded the firmware for UNO 16U2 controller using MEGA-dfu_and_usbserial_combined.hex
After this, we are able to see the Atmega 2560 in the PORT when we connect the UNO board.
But still we are unable to program the Mega2560 from UNO 16U2 controller.
When we are trying to program, the TX and RX pins doesnt respond and we are getting following error messages:
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
So please provide valuable inputs.
Regards,
Murali
First of all, 3 signals are needed for serial uploading Rx, Tx and DTR->RESET.
I forgot mention that the target controller ATmega2560 have to have the bootloader. Has it? If it is Arduino it already has, of course.
... to upgrade 16U2 is useless for programming Mega, but make sure it works after upgrade.
hai budvar10 thanks for the reply...
My question is i have two Arduino boards(Arduino UNO & Arduino Mega),But my Arduino Mega Board's USB is not recognizing because of ic problem in mega board(16u2)..My Arduino UNO is Working perfectly fine,Now i am trying to connect the Arduino UNO to the computer and Select Tools->Port->Arduino UNO..Then i Connected the mega 2560 and UNO boards Tx and Rx Pins,now i select Tools->Board->Arduino Mega 2560..
if i upload the program now will my Arduino Mega 2560 get Programmed or Not.. i tried searching online for this type of procedure but i have no luck find one..i am working on this for almost one week without any result..
if anybody knows the procedure to upload sketch from Arduino UNO to Mega2560 by using Rx and Tx pins please let me know..
thank you
UNO an Mega have same USB/Serial circuit so it have to work but again, 3 signals are needed: Rx, Tx and RESET.
See the first sentence in my previous post.
Reset is important for the target ATmega to start execute the bootloader and listening for uploading commands.
You can emulate the reset signal by pressing the reset button on the target. However, it is not easy to hit the right moment.
Hai sir,
I have connected all the 3 wires as you said..
RESET -> RESET
TX -> RX
RX -> TX
But still the same problem..
i am uploading the images of the board's connection,pls check and let me know if i had done anything wrong..
thank you..
Connections look good. Are you sure the UNO without chip is working correctly?