Go Down

Topic: First experiences and a fried Mega ADK (Read 837 times) previous topic - next topic


Jan 27, 2013, 05:08 pm Last Edit: Jan 27, 2013, 05:13 pm by kernell32 Reason: 1

First of all i want to say this is a really cool project and a fantastic community!

I am a complete noob in programming microcontrollers, but i think im learning fast (sometimes it hurts thou)

My plans with Arduino go towards interactive art projects.

I got an Mega ADK and i am still working my way through basic examples in controlling/combining basic setups (mainly sensors ans motors)

One of my first steps was gathering parts from all sorts of devices (broken scanners printers etc.) so i have a few stepper motors that i want to include in my first mobile arts project.

Thatfore i have bought a EasyDriver stepper driver, wich is working well.

Since one of my steppers is labeled 24v i didnt get it to work to my satisfaction with 5v - 12v but i also hacked an old ATX powersupply so i can use it for my lab, thatone includes a negative 12v supply, so i thought :-) hey -12v to ground +12v to my EasyDriver external vin and i get my 24v! (see picture) just i didnt consider that EasyDriver connect its grounds to my arduinos ground to be common :-(
So basically what happened i supplied negative load (-12v) to my arduino and since that its "toasted"

Symptoms when connecting usb are:

  • Power LED is permanently on

  • onboard (pin 13) LED is permanently on

  • arduino doesnt get recognised by my systems (i tried several machines Linux, MAC, Windows and several usb cables) "unable to enumerate usb device" a little research shows that the device doesnt supply vendor id or device id, its all zeros, power from usb works thou

I checked the boards pins with my multimeter and all seems fine (3.3v, 5v, voltage regulator, etc.)

After searching the forum and other ressources i come to the conclusion that either the ATmega2560 Microprocessor or the ATmega16U2 is toasted (or both)

so what i did is i ordered a new Mega ADK (i will need a second one anyway for Production) and i found "Arduino-COMBINED-dfu-usbserial-atmega16u2-MegaADK-Rev3.hex" in arduinos github, is it possible to reflash both ATmega2560 Microprocessor and ATmega16U2 using that file and another Mega as ISP or do i need an external programmer to do that?
Is there any chance that this wil help at all? I want to atleast be able to program the toasted Mega using serial if the ATmega16U2 is fried.

Thanks for all suggestions!


Jan 30, 2013, 05:38 pm Last Edit: Jan 30, 2013, 05:41 pm by kernell32 Reason: 1

so i got my spare mega now and i have tried using it as isp to reflash the toasted mega.

Using the Arduino software i get:

avrdude: verification error, first mismatch at byte 0x1e000
        0xff != 0x0d
avrdude: verification error; content mismatch

After reading a little i get the impression that the Mega ADK v3 cant be flashed using arduino software because of 120KB

Anyway using the commands stolen from arduino software directly with avrdude from macports i get the same error.

Code: [Select]
avrdude -C/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega2560 -cstk500v1 -P/dev/tty.usbmodemfd141 -b19200 -e


Code: [Select]
avrdude -C/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega2560 -cstk500v1 -P/dev/tty.usbmodemfd141 -b19200 -Uflash:w:/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/bootloaders/stk500v2/stk500boot_v2_mega2560.hex:i -Ulock:w:0x0F:m

still no usb device is recognised ofcourse when i plug the fried Mega.
But my "L" LED doesnt shine constantly anymore but is blinking, so something has happened.

I guess i need to flash the atmega16u2 aswell anyway.

Is there a way around the 120K memory problem and if so can i use the same command and my new MegaADK to flash
fom Arduino firmware sources?
Or do i need a Programmer like "Atmel AVR ISP mkII"

My wiring for flash procedure seems fine, i use this scheme:

What am i missing?

Thanks for all hints.



i got a few steps further  8)

still when i try to upload the bootloader to the atmega2560 using ArduinoISP i get:

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x1e000
         0xff != 0x0d
avrdude: verification error; content mismatch using:

Commands used:
Code: [Select]
avrdude -C/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega2560 -cstk500v1 -P/dev/cu.usbmodemfd141 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0xFD:m -Uhfuse:w:0xD8:m -Ulfuse:w:0xFF:m

Code: [Select]
avrdude -C/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega2560 -cstk500v1 -P/dev/cu.usbmodemfd141 -b19200 -Uflash:w:/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/bootloaders/stk500v2/stk500boot_v2_mega2560.hex:i -Ulock:w:0x0F:m

Anyway i finally figured out that i need to use the second icsp header to access the 8u2/16u2 interface  :*

Code: [Select]
avrdude -C/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf -v -v -v -v -pm8u2 -cstk500v1 -P/dev/tty.usbmodemfd141 -b19200  -e -Ulock:w:0x3F:m -Uefuse:w:0xFD:m -Uhfuse:w:0xD8:m -Ulfuse:w:0xFF:m

Code: [Select]
avrdude -C/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf -v -v -v -v -pm8u2 -cstk500v1 -P/dev/tty.usbmodemfd141 -b19200 -Uflash:w:/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/firmwares/atmegaxxu2/MEGA-dfu_and_usbserial_combined.hex:i -Ulock:w:0x0F:m

seems to work fine (no errors)

but still i get:

[0xffffff804b1eee00] The IOUSBFamily gave up enumerating a USB device after 10 retries.  (Port 4 of Hub at 0xfd100000)

when i plug the fried Mega to usb.

I then found the Atmega_Board_Detector from Nick.

reading the ATmega8U2 ICSP gives me:

Atmega chip detector.
Entered programming mode OK.
Signature = 1E 93 89
Processor = ATmega8U2
Flash memory size = 8192
LFuse = FF
HFuse = D8
EFuse = FD
Lock byte = CF
Clock calibration = 5D
Bootloader in use: Yes
EEPROM preserved through erase: No
Watchdog timer always on: No
Bootloader is 4096 bytes starting at 1000

and reading the ATmega2560 ICSP gives me:

Atmega chip detector.
Entered programming mode OK.
Signature = 1E 98 01
Processor = ATmega2560
Flash memory size = 262144
LFuse = FF
HFuse = D8
EFuse = FD
Lock byte = FF
Clock calibration = 56
Bootloader in use: Yes
EEPROM preserved through erase: No
Watchdog timer always on: No
Bootloader is 8192 bytes starting at 3E000

So to me it looks like the Controllers are actually there and good (but i dont know much about microcontrollers :) still learning), so the Problem must be something more physical after all, some fried components on the board  =(

Or am i missing something?
Maybe wrong fuse settings on the Atmega8u2?
What do they need to be set to?
I didnt find any information on fuse settings for the 8u2 on that board yet.
What else could i try?



i noticed that after the ptocedures from my last post my board is acting even more weird  :smiley-mr-green:

now once i plug it to usb "L" led blinks
next time i plug it blinks and "RX" led is on

this is randomly happening, sometimes like this, sometimes like that :-)
This is new

Go Up