Using Mbed as a standard Generic Usb audio media device.

Ok you will need either a USB A, or a USB B socket board kit. I use Cool-Components-Workshop-Board

/media/uploads/coolcomponents/mbedv2.jpg

http://mbed.org/cookbook/Cool-Components-Workshop-Board

And a pair of glasses, I like Green Ace shade 3...Eagle Eyes.... Don't spend to much time watching videos, listening to music, or watching pornography, no Offense ladies you might go blind

/media/uploads/mbed2f/_scaled_-biqhwg-cgk---kgrhquokimesnpszfgmbln-ow0-r---_12.jpg

/media/uploads/mbed2f/--kgrhqiokjqe4neylnrobomejsj6bg--0_1.jpg

If you don't know the difference between a delta sigma dac and how horrible they can sound, and what a R2R Dac is such as what Mbed has.. and how great it can sound now is the time to learn..

Once you have the usb board or socket sorted, or if you made you own from a usb cable perhaps.. plug her in and she will mount as a standard Generic Usb audio media device

/media/uploads/mbed2f/_scaled_lpc_speaker.jpg

If you need a closer look

http://mbed.org/media/uploads/mbed2f/lpc_speaker.jpg

Here is the source code of the files, but it was not written in the online compiler

http://mbed.org/media/uploads/mbed2f/code.bundle.lpc17xx.keil.zip

And finally this bin file

http://mbed.org/media/uploads/mbed2f/usbaudio.bin

USB LED OFF

/media/uploads/mbed2f/usbaudioledoff.bin

Reverse effect code for standard Generic Usb audio media device

/media/uploads/mbed2f/reverseeffectusbaudio.zip

/media/uploads/mbed2f/usbaudioyoda.bin

Reverse effect code with USB LED OFF increased buffer 1061

==

/media/uploads/mbed2f/usbaudloyodaledoff1061.bin

/media/uploads/mbed2f/usbaudloyodaledoff1024.bin

usb asynchronous transfers bin for the reverse effects code

/media/uploads/mbed2f/usb_asynchronous.bin


8 comments on Using Mbed as a standard Generic Usb audio media device. :

25 Jul 2011

now I understand what the glasses are for :-) (the blue leds! hehe)

25 Jul 2011

Gert van der Knokke wrote:

now I understand what the glasses are for :-) (the blue leds! hehe)

Yes, well now you have a choice:) need to get it added to the cookbook and get the ADC part of it working..

it right here just need to figure it out activate it. And also this code has already been ported into mbed online compiler..

http://mbed.org/users/frank26080115/programs/LPC1700CMSIS_Examples/lobvoi

http://mbed.org/users/frank26080115/programs/LPC1700CMSIS_Examples/lobvoi/docs/USBDEV_2USBAudio_2Abstract_8h_source.html

/* Audio Control Interface Descriptor Subtypes */

  1. define AUDIO_CONTROL_UNDEFINED 0x00
  2. define AUDIO_CONTROL_HEADER 0x01
  3. define AUDIO_CONTROL_INPUT_TERMINAL 0x02
  4. define AUDIO_CONTROL_OUTPUT_TERMINAL 0x03
  5. define AUDIO_CONTROL_MIXER_UNIT 0x04
  6. define AUDIO_CONTROL_SELECTOR_UNIT 0x05
  7. define AUDIO_CONTROL_FEATURE_UNIT 0x06
  8. define AUDIO_CONTROL_PROCESSING_UNIT 0x07
  9. define AUDIO_CONTROL_EXTENSION_UNIT 0x08
01 Aug 2011

Reverse effect code for standard Generic Usb audio media device

/media/uploads/mbed2f/reverseeffectusbaudio.zip

/media/uploads/mbed2f/usbaudioyoda.bin

13 Sep 2011

Please check out my Notebook page for an explanation of how to set the breadboard up

http://mbed.org/users/mbed2f/notebook/bread-board-setup-1/

http://mbed.org/users/mbed2f/notebook

22 Oct 2011

any advice on getting this source to work with either the online compiler or gcc4mbed ?

22 Oct 2011

Jonathon Fletcher wrote:

any advice on getting this source to work with either the online compiler or gcc4mbed ?

No clue I emailed simon nothing from him, it was added here, but does not work with compiler.

http://mbed.org/users/frank26080115/programs/LPC1700CMSIS_Examples/lobvoi

but the mbed needs a debugger will it get one probably not, will this ever get added to my programs probably not:)

I wanted to add a microphone to the usb code so I can plug my guitar and mix with windows sounds will that happen who knows. I am stuck on usbuser and how the main file should be set out and done with the adding two timer interrupts tickers I think, But I have no clue because I have never ever really seen any microphone ADC code for usb devices.

22 Oct 2011

Philips Philips wrote:

Jonathon Fletcher wrote:

any advice on getting this source to work with either the online compiler or gcc4mbed ?

No clue I emailed simon nothing from him, it was added here, but does not work with compiler.

http://mbed.org/users/frank26080115/programs/LPC1700CMSIS_Examples/lobvoi

but the mbed needs a debugger will it get one probably not, will this ever get added to my programs probably not:)

I wanted to add a microphone to the usb code so I can plug my guitar and mix with windows sounds will that happen who knows. I am stuck on usbuser and how the main file should be set out and done with the adding two timer interrupts tickers I think, But I have no clue because I have never ever really seen any microphone ADC code for usb devices.

I worked through the code you posted - updated the type of pD to be uint8_t* so the ptr math worked and cast into USB_CONFIGURATION_DESCRIPTOR* for each usage (in usbcore). Also some mucking with USB_DMA_Setup to get the compiler to access the uint32_t / uint32_t* casts (usbhw.c). SystemFrequency needed switching to SystemCoreClock in usbdmain.c. There was some fussing about the packed preprocessor instructions being ignored though.

With these changes I could get .bin output via both the online compile and via gcc4mbed. Unfortunately no USBDevice presentation after using the resulting .bin though.

I was curious what was different in the online/gcc4mbed runtimes to the Keil one. The Keil std compiler was offered at HK$22,300 and the pro at HK$85,000 - both waaaay outside my price range - and the lite was 'not for sale in Hong Kong'.

22 Oct 2011

Jonathon Fletcher wrote:

Philips Philips wrote:

Jonathon Fletcher wrote:

any advice on getting this source to work with either the online compiler or gcc4mbed ?

No clue I emailed simon nothing from him, it was added here, but does not work with compiler.

http://mbed.org/users/frank26080115/programs/LPC1700CMSIS_Examples/lobvoi

but the mbed needs a debugger will it get one probably not, will this ever get added to my programs probably not:)

I wanted to add a microphone to the usb code so I can plug my guitar and mix with windows sounds will that happen who knows. I am stuck on usbuser and how the main file should be set out and done with the adding two timer interrupts tickers I think, But I have no clue because I have never ever really seen any microphone ADC code for usb devices.

I worked through the code you posted - updated the type of pD to be uint8_t* so the ptr math worked and cast into USB_CONFIGURATION_DESCRIPTOR* for each usage (in usbcore). Also some mucking with USB_DMA_Setup to get the compiler to access the uint32_t / uint32_t* casts (usbhw.c). SystemFrequency needed switching to SystemCoreClock in usbdmain.c. There was some fussing about the packed preprocessor instructions being ignored though.

With these changes I could get .bin output via both the online compile and via gcc4mbed. Unfortunately no USBDevice presentation after using the resulting .bin though.

I was curious what was different in the online/gcc4mbed runtimes to the Keil one. The Keil std compiler was offered at HK$22,300 and the pro at HK$85,000 - both waaaay outside my price range - and the lite was 'not for sale in Hong Kong'.

Download Uvision, it is now called MDK-ARM. I did a little tutorial of how to create a bin with it

http://mbed.org/users/mbed2f/notebook/using-uvision--to-create-a-bin-file-for-any-projec/

Here is a pdf tutorial that Arm made of how to use the mbed with uvision

http://mbed.org/media/uploads/mbed2f/apnt207-1-.zip

https://www.keil.com/demo/eval/arm.htm

It would be nice to get at least the speaker code in the cookbook, but it seems nobody wants to help.

Please log in to post comments.