Arduino Forum

Using Arduino => Microcontrollers => Topic started by: s3000xl on Sep 20, 2018, 12:10 pm

Title: dfu mode for ADK mega 2560
Post by: s3000xl on Sep 20, 2018, 12:10 pm
I'm trying to create a Midi controller using https://github.com/tttapa/MIDI_controller (https://github.com/tttapa/MIDI_controller) with a Android ADK (https://web.archive.org/web/20110608002955/http://developer.android.com:80/guide/topics/usb/adk.html) (board based on Arduino Mega2560 and Circuits@Home USB Host Shield) that I got back in 2011.

I've managed to get it hooked up to my Mac and loaded a sketch onto it in the Arduino IDE so all seems OK from that point of view. However, the next steps are to put it into dfu mode to allow me to switch in and out the midi firmware.

What I cannot work out is how to put it into dfu mode. Looking at the general guide for mega 2560 I would be looking to connect the two pins next to the USB, however this board doesn't have those pins. I'm pretty new to this be from what I can work out I'm trying to connect RESET2 to ground so just need to locate RESET2. Am I right?

On the back of the board there are contact points for GND_1, RST1, MOSI1, SCK1, 5V_1 and MISO1, which I think are the same as "ICSP for ATmega2560" rather than "ICSP for 16U2" (as described here https://forum.arduino.cc/index.php?topic=125908.0 (https://forum.arduino.cc/index.php?topic=125908.0)). I can't seem to track anything for RESET2.

Attached are some photos of the board.

Can anyone help me figure out how to get it into dfu mode?


(https://forum.arduino.cc/index.php?action=dlattach;topic=569471.0;attach=274778)

(https://forum.arduino.cc/index.php?action=dlattach;topic=569471.0;attach=274776)
Title: Re: dfu mode for ADK mega 2560
Post by: DrAzzy on Sep 20, 2018, 11:33 pm
Does the ADK even have a 16u2 that can be reprogrammed to act as a midi controller?

Looking at that picture, it doesn't look like it does - it looks like it uses some other serial adapter IC?

Look at the markings on the chips around the USB connector. You're looking for an Atmel 16u2 or 8u2 - or to identify what the other serial adapter is (feel free to post part numbers you find - we'll be able to tell you if one is a serial adapter IC, the presence of which would make everything make sense and indicate that it could not be turned into a midi device).
Title: Re: dfu mode for ADK mega 2560
Post by: s3000xl on Sep 22, 2018, 02:59 pm
Hi DrAzzy... when I connect it to my Mac and look at the USB details is says it's a "FT232R USB UART"

I've attached a close-up photo of the top of the board where I think I can see the chip.

I'm guessing this might be a special chip to allow for USB host mode when connecting to an Android device? Do you think I'll be able to get this working as a Midi USB device or should I be looking to get another board?

(https://forum.arduino.cc/index.php?action=dlattach;topic=569471.0;attach=275085)


Title: Re: dfu mode for ADK mega 2560
Post by: DrAzzy on Sep 22, 2018, 06:16 pm
FT232R is a standard USB interface chip. That board cannot be put into DFU mode or reprogrammed to act as a midi controller.

I think the USB host is via that chip by MAXIM next to the other USB port.
Title: Re: dfu mode for ADK mega 2560
Post by: s3000xl on Sep 23, 2018, 12:29 pm
Darn it. Thanks for confirming DrAzzy. I guess I'll need to get another board. Seems like Leonardo might be the right choice for me? From what I read it seems like it's chip is easiest to program for midi.
Title: Re: dfu mode for ADK mega 2560
Post by: DrAzzy on Sep 24, 2018, 06:56 pm
Yes, it is, since you connect to the chip through it's native USB interface, rather than another chip that needs to be awkwardly reprogrammed.

I think you can also do it on the SAM-based boards (due, zero) but I haven't worked with those boards so I'm not authority.
Title: Re: dfu mode for ADK mega 2560
Post by: s3000xl on Sep 24, 2018, 10:19 pm
Thanks again DrAzzy!