Mbed midi controller feasibility

mbedmicrocontrollermidi

I'm looking to start on my first microcontroller project– a midi controller that (hopefully) will connect to an android device via ADK as part of a touch interface. I've never worked with this lower level hardware type stuff, so before I start investing cash and time I want to make sure I've got a board that's capable enough for the project.

I'm eyeing the mbed LPC1768 because it has usb host functionality and what look to be fairly flexible libraries for usb and usb-midi. My rough plan is to do 12 -16 pots/faders, 6 on the analog io and the rest on a multichannel adc, and about as many buttons on the digital side. The mbed will have to run to some sort of usb hub that can "route" the signal to the correct endpoint: android ADK -> mbed to change midi function (lower timing priority), mbed -> host pc to transmit the data (higher timing priority).

  1. Will the LPC1768 (100 MHz ARM Cortex-M3, 64 KB SRAM, 512 KB Flash) accommodate the above functions at a perceptibly instantaneous time scale? (ie midi latency ideally < 1ms)?

  2. If so, how do I go about it? What interface(s) to use (mbed offers i2c and SSP), how to handle data sampling of the inputs, how to solve the data routing problem, etc.

Best Answer

The mbed will have to run to some sort of usb hub that can "route" the signal to the correct endpoint: android ADK -> mbed to change midi function (lower timing priority), mbed -> host pc to transmit the data (higher timing priority).

Unfortunaltely, this is not possible with the LPC1768: the USB must be in Host Mode for the Android ADK, but in Device Mode for the PC connection. But there is only one USB peripherial on the LPC1768 - it can work in either mode but not both at once.

It might work with the bigger brother, the LPC18xx from NXP - some variants have two USB units.