Troubles with uploading the code to mega2560 from arduino IDE using AVRISP MKII

Hi!
I am realtively new to arduino. I was trying to upload code to mega2560 using UNO as ISP, everything worked fine, until i tried to upload code directly from Arduino IDE then i got avrdude timeout() messages . As i understood i have some problems with usb to serial on mega2560. I have tried serial loopback but nothing got echoed. When i open the serial monitor the mega2560 resets ( the buildin_led changes state when opening serial monitor).
I would appreciate any help finding out the solution for this problem.

(This is my first question on arduino forum, so i apologize if it is not in the right section)

A good start would be the following links.

Take a few moments to Learn How To Use The Forum.

Other general help and troubleshooting advice can be found here.
It will help you get the best out of the forum in the future.

They will not only show you what information is needed but may even help with your problem.

I doubt you have a problem with "usb to serial" if opening serial monitor resets the Mega. Further I have read (but don't know how correct it is) that the loopback test does not always work with clone boards (possibly CH340 related).

If you connected pins 11/12/13 of your Uno to the same pins on the Mega, it will not work because those pins on the Mega don't provide SPI functionality.

rawias:
I was trying to upload code to mega2560 using UNO as ISP

When you do an "Upload Using Programmer", it erases the bootloader that is necessary to do normal uploads over the Mega's USB cable. So after doing that, you need to do a Tools > Burn Bootloader before you can go back to normal uploads again.

sterretje:
I have read (but don't know how correct it is) that the loopback test does not always work with clone boards (possibly CH340 related).

I can confirm the loopback not working with CH340 boards.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.