Uploading the sketch does not finish

I have a self assembled Arduino Mega2560 board with Mega16U2. An example sketch compiles well but the upload bar never go to the finish.

There is Com port for Arduino and everything seems to be well on the PC. I used these firmwares for the chips: For the 16U2 C:\Program Files\arduino-1.0.1\hardware\arduino\firmwares\Arduino-COMBINED-dfu-usbserial-atmega16u2-MegaADK-Rev3.hex

And for the ATMega2560 C:\Program Files\arduino-1.0.1\hardware\arduino\bootloaders\stk500v2\stk500boot_v2_mega2560.hex

I used AVRstudio with AVRISP for burning firmware. How I can get a hex-file from Arduino IDE. I could burn it with AVRSTUDIO.

Unfortunately there are no LEDS on the board. But power is ok 5volts.

Check your code for “!!!”. The Mega bootloader has a monitor mode that allows it to respond to commands from Serial Monitor. Unfortunately it takes any three ‘!’ characters in a row as a command to switch into monitor mode, EVEN IF IT"S DOWNLOADING BINARY! Make sure you don’t have three in a row.

This is interesting. Where can I find more info about the monitor mode. I could test the usb part better with it.


LMI: This is interesting. Where can I find more info about the monitor mode. I could test the usb part better with it.


From the bootloader sources (https://github.com/arduino/Arduino-stk500v2-bootloader/blob/master/stk500boot.c):

0 = Zero addr ? = CPU stats @ = EEPROM test B = Blink LED E = Dump EEPROM F = Dump FLASH H = Help L = List I/O Ports Q = Quit R = Dump RAM V = show interrupt Vectors Y = Port blink

Thank you. I realised that I could have searched for it, but Github is not part Arduino site, I think. So this is a direct link instead plenty of forum links from 2006.

I could get any response from the board. !!! did not do anything.

Uploading a sketch still newer finishes. A small program works if I burn it with AVRstudio and AVRISP, and the board looks like a com port to a pc. But uploading with Arduino does not work.

Does your sketch contain '!!!' anywhere? If not, perhaps you have a different problem.

To activate monitor mode you have to send !!! while the bootloader is waiting for an upload. Try typing !!! into Serial Monitor, pressing the Reset button on the Arduino, an hitting Return on Serial Monitor.

Did you first burn the bootloader? This happens if it has no bootloader, or if it is corrupt. Try burning the bootloader in the arduino ide. Put your dmm on gnd and pin 13 (pb7) it should toggle between 0 and 5v if the bootloader is working right.

I see.

I have try that reset pin. I managed to program the 2560 with AVRstudio and AVRISP2, so this is not so urgent any more.