|
![]() USB
![]() USB - MIDI Source
|
| next newest topic | next oldest topic |
| Author | Topic: USB - MIDI Source |
|
radim100 New Member |
Hi , can some body please point me or send some code to implementUSB MIDI ( mainly controller ) on C8051F34X or 32X family of MCUs. Thanks . IP: Logged |
|
Rambo Member |
Google is your friend. http://www.google.com/search?hl=en&source=hp&q=midi+source+code+8051&aq=f&oq=&aqi= IP: Logged |
|
radim100 New Member |
Thanks for info . I am more interested in some snippets of code for C8051F34X USb MIDI than generic 8051 and any MIDI ( no serial ) Regards IP: Logged |
|
Tsuneo Member |
Recently, I'm commenting about MIDI everywhere. Is it current fashion of USB?
"USB Device Class for MIDI - followup"
"Optimization of SiLabs USB examples in code size" This example handles endpoints in the superloop of main, though (most of) SiLabs examples do it in USB interrupt. It fits to handle the events of device origin, like MIDI keyboard input. For your service, I post the descriptors here. Replace USB_Descriptor.c and USB_Descriptor.h of above example. USB_MIDI_Type.h is same as USB_INT_Type.h, just the file name is changed. Tsuneo
USB_Descriptor.c
USB_Descriptor.h
IP: Logged |
|
radim100 New Member |
Thanks Tsuneo, Your contribution to this forum and other forums is great and appreciated. I have implemented MIDI code you have posted above and so far device can be recognized by Win Xp. I will post code as soon as I will have I/O part done . Regards. IP: Logged |
|
radim100 New Member |
Hi, I have compiled USB MIDI code as recommended by Tsuneo. Attched ZIP for Keil UV3 . Code is fitted to go on Toolstick F342DC board . Pot is used for CC , SW! and Port1 for Keys . Code is running fine on my 2 machinnes . First one is Win XP Media Center SP3 , second Vista Home . However I have problem on 3rd PC which was originall Win Xp Pro SP2 . So I updated to SP3 and reisntalled all driver but problem persist . Do you guys have any ideas . I am testing with MIDI OX and several MID Hosts . Problem is the same . All off applications can see interface if plugged in but cannot transfer any data . There is long time delay and MIDI OX is locking and freezend if Audio Device enabled . Thanks for any insite. Regards Radim. connect IP: Logged |
|
radim100 New Member |
Here is that Source Code : http://www.micronix.ca/MIDI_USB/USB_MIDI_C8051F342DC.zip IP: Logged |
|
Tsuneo Member |
You mean, on a specific PC, the device is enumerated successfully, but bulk transfer fails. a) Timing of packet transfer As you put packets to the bulk IN always when it is possible for the endpoint, it may disturb the device driver on the PC with too frequent packet handling. Send a packet just when it is needed.
b) Conflict with SiLabs usb_interrupt device driver VID/PID of your device is same as SiLabs usb_interrupt example. USBDeview Before releasing your device off from your desktop, get an official VID/PID for the device. SiLabs MCU KB: "Obtaining a Unique PID" Tsuneo [This message has been edited by Tsuneo (edited September 11, 2009).] IP: Logged |
|
radim100 New Member |
Hi , Thanks to Tsuneo for his help with my previous problem . After I have modified Sendding packets part of code it works on all 3 PC I have tested my code . At this link : http://www.micronix.ca/MIDI_USB/USB_MIDI_C8051F342DC.zip there is Multiproject files for Keil UV3 which has demo MIDI code for all 3 evaluation bords for Toolstick F342Dc, F321DC and F327DC . Code is only to test MIDI USB on this hardware . I have also changed VID /PID to 0xFFFF/0x0001 ( resp. 0x0002,0x0003 ) for prototyping stage . Regards Radim. IP: Logged |
|
radim100 New Member |
I have had above code working for some time OK. Now I would like to add HID to its MIDI as composite device. Any hints what needs to be added and what code to be modified ? Thanks. [This message has been edited by radim100 (edited July 30, 2010).] IP: Logged |
All times are CT (US) | next newest topic | next oldest topic |
![]() |
|
Have you seen our MCU Knowledge Base?