Sample code for USB - MIDI


+ Reply to Thread
Results 1 to 12 of 12
  1. #1
    Join Date
    Feb 2012
    Posts
    45

    Default 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!

  2. #2
    Join Date
    Feb 2012
    Posts
    45

    Default Re: Sample code for USB - MIDI

    Nobody knows? Too difficult?

  3. #3
    Join Date
    Feb 2013
    Posts
    576

    Default Re: Sample code for USB - MIDI

    Activity goes down and down here.....

  4. #4
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    875

    Default 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

  5. #5

    Default 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?
    George

  6. #6

    Default Re: Sample code for USB - MIDI

    Don't seem to be able to edit my previous - should read "perhaps with a similar descriptor format?"
    George

  7. #7
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    875

    Default 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.

  8. #8

    Default 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.
    George

  9. #9
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    875

    Default Re: Sample code for USB - MIDI

    Quote Originally Posted by towlerg View Post
    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

    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!

  10. #10
    Join Date
    Feb 2012
    Posts
    45

    Default Re: Sample code for USB - MIDI

    OK, let's forget this all and use a dedicated USB to MIDI chip...

  11. #11

    Default Re: Sample code for USB - MIDI

    "You probably didn't see this in the OM." I did not. Mea culpa
    George

  12. #12
    Join Date
    Apr 2014
    Location
    Northeast
    Posts
    328

    Default 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.

Similar Threads

  1. MIDI Descriptor for USB communication
    By RuudNL in forum USB
    Replies: 16
    Last Post: - 11th December 2019, 05:33
  2. MIDI over USB
    By RuudNL in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 12th November 2017, 00:33
  3. MIDI over USB peripheral
    By aberco in forum USB
    Replies: 1
    Last Post: - 31st October 2011, 17:06
  4. MIDI to USB
    By DaveC3 in forum USB
    Replies: 0
    Last Post: - 31st March 2011, 21:38
  5. USB to MIDI module
    By Coco Sapone in forum Adverts
    Replies: 0
    Last Post: - 23rd October 2010, 18:13

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts