Sample code for USB - MIDI
Is there any sample code available to have a PIC18F4550 recognized by the PC as an (USB) MIDI device?
(And yes, I know it is mainly finding the correct device descriptor...)
I have been struggling with this problem for a long time, but unfortunately without success.
In principle, I am mostly interested in communication FROM the PC TO the 18F4550.
It is driving me crazy... Tried almost everything, but I can't get it working!
So I hope one of the clever people here can steer me in the right direction!
Re: Sample code for USB - MIDI
Nobody knows? Too difficult?
Re: Sample code for USB - MIDI
Activity goes down and down here.....
Re: Sample code for USB - MIDI
have you tried the Windows based HID descriptor tool application? It contains some sample descriptors which can help you get started. I have not checked if it has a MIDI descriptor.
I found a thread which may help you
https://www.microchip.com/forums/m297214.aspx
Re: Sample code for USB - MIDI
The problem with finding descriptors for other format compilers is trying to convert them. Have you looked at other PIC device Basic compilers, perhaps with a similar format?
Re: Sample code for USB - MIDI
Don't seem to be able to edit my previous - should read "perhaps with a similar descriptor format?"
Re: Sample code for USB - MIDI
Since you're looking for plain communication with the PC via USB, I can suggest you look up the USB CDC descriptor. This will turn your PIC into a USB comm port visible to your PC. You then just communicate with that comm port.
Re: Sample code for USB - MIDI
I see you're a subermod but I don't see how running a USB capable PIC device as CDC help the op problem.
Re: Sample code for USB - MIDI
Quote:
Originally Posted by
towlerg
I see you're a subermod but I don't see how running a USB capable PIC device as CDC help the op problem.
You probably didn't see this in the OM. Moreover, I wonder what being supermod got to do with helping someone
Quote:
In principle, I am mostly interested in communication FROM the PC TO the 18F4550.
It is driving me crazy... Tried almost everything, but I can't get it working!
Re: Sample code for USB - MIDI
OK, let's forget this all and use a dedicated USB to MIDI chip...
Re: Sample code for USB - MIDI
"You probably didn't see this in the OM." I did not. Mea culpa
Re: Sample code for USB - MIDI
Most of the USB code floating around is based on the HID class. However, if you download the current Microchip Libraries for Applications (MLA), and go to:
mla/v2018_11_26/apps/device/audio_midi
there are examples for numerous PIC devices. Of course, it will be written in C, and will have to be opened in MPLABX. That's about as much help as I can offer.