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
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
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
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. :
now I understand what the glasses are for :-) (the blue leds! hehe)
jonathonfletcher
#
22 Oct 2011
any advice on getting this source to work with either the online compiler or gcc4mbed ?
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.
jonathonfletcher
#
22 Oct 2011
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'.
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.
now I understand what the glasses are for :-) (the blue leds! hehe)