0
\$\begingroup\$

[For a detailed post of my problem read here]

Long story short: My Arduino mega 2560 works fine (I plug it in, code runs flawlessly) except for the usb-serial converter which when connected to the PC (running w7 x64) won't be recongnized, not even on Device Manager. After digging I came to the conclusion that I had to reprogram the ATmega 8u2 serving as the usb-serial converter. Borrowed a friend's Mega ADK which works correctly with the same usb cable, OS and everything. Loaded it up with arduinoISP sketch so as to use it to program the 8u2 on my faulty mega. Everything connected and I tried this command on the CMD prompt:

avrdude.exe 
  -C [pathToArduinoFolder]\arduino-1.0.1\hardware\tools\avr\etc\avrdude.conf
  -c arduino -p at90usb82 -P [COM_Port_where_arduinoISP_is_connected] -F
  -U flash:w: [pathToArduinoFolder]\arduino-1.0.1\hardware\arduino\firmwares\arduino-usbserial\arduino-usbserial-mega.hex

when I hit enter the error led flashes, the heartbeat led turns off and nothing happens for a few seconds. After that, the programming led flashes a few times, the error led flashes once and finally the heartbeat keeps on glowing. On the CMD prompt I get this message

avrdude.exe: stk500_getsync(): not in sync: resp=0x00

which leads me to think that my mega is not responding to the programmer.

How can I beat through this error and get my mega to work again?

\$\endgroup\$
4
  • \$\begingroup\$ The assumption that the 8u2 has only lost its program, and not suffered permanent damage seems questionable. However you could also consider the wrong clock fuse problem as a potential impediment to programming. An external. FTDI cable remains as a possible permanent workaround if changing out the 8u2 is beyond your rework comfort. Testing your programming setup against some loose atmel part on a breadboard might be worthwhile too. \$\endgroup\$ Mar 9, 2013 at 15:50
  • \$\begingroup\$ a friend (how happens to be an electronic engineer) tells me if no smoke nor sparks came from the board nothing burned. it's a bit of a joke but also true. if the 8u2 is burned due to overvolt then I should've smelled something. I didn't quite understand your last sentence though \$\endgroup\$
    – rMaero
    Mar 9, 2013 at 17:46
  • \$\begingroup\$ That's not remotely true. It's entirely possible for just an I/O pin's circuitry to be destroyed, with no visible damage to the package, or even immediately apparent degradation to the rest of the chip (though all bets are off as to reliability). Saw such a failure only yesterday. As for the last, I was meaning if you have a (DIP) atmega or attiny on hand you could try programming that on a breadboard to test your ISP setup and procedures. \$\endgroup\$ Mar 9, 2013 at 18:57
  • \$\begingroup\$ that I must agree with you. although in this particular case I would've expected to see some smoke since I fed the whole arduino (hence, the 8u2) with 12v while the datasheet says 2.5-5.5V opeating range. I see it as a high possibility that the 8u2 is burned but I'm exceptical about that since the atmega2560 is fine and its operating voltage range is 1.8-5.5V so it should've burned too. as for another atmega or tiny: no, I'm quite limited for those kinds of components, I bearly could get arduinos \$\endgroup\$
    – rMaero
    Mar 9, 2013 at 19:22

1 Answer 1

2
\$\begingroup\$

Here's a few things you might be doing wrong, or that you can try:

  1. Are you connecting to the 6-pin header that is adjacent to the 8u2? That's the ISP port for that device
  2. As described here, if you are using the arduino ISP sketch in the Arduino 1.0 or later environment, you have to modify the ArduinoISP sketch slightly; delay(20) instead of delay(40) in the heartbeat function.
  3. You could always break down and buy a real ISP programmer (I recommend the AVR ISP mkII), and then use AVR Studio to flash your 8u2 with the appropriate hex file.
\$\endgroup\$
1
  • \$\begingroup\$ thanks for the answer! 1) yes, I always tried programming the 8u2 in that ICSP port. 2) I am using arduino 1.0.1 also downloaded 1.0.2 and tried with that one. Just to be sure I checked that specific delay to be in 20. 3)I'll see what I can get, but those things are quite rare where I live but if I can get my hands on one I sure will give it a try! \$\endgroup\$
    – rMaero
    Mar 9, 2013 at 17:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.