Pages: [1]   Go Down
Author Topic: Uploading the sketch does not finish  (Read 705 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 31
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 180
Posts: 8108
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Turku
Offline Offline
Full Member
***
Karma: 0
Posts: 201
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Leif
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 180
Posts: 8108
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Leif

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
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Turku
Offline Offline
Full Member
***
Karma: 0
Posts: 201
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 31
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 180
Posts: 8108
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Offline Offline
Jr. Member
**
Karma: 0
Posts: 78
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: August 24, 2012, 08:55:58 pm by Houser636 » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 31
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: [1]   Go Up
Jump to: