Jump to content

MIDI -> Parallel with PIC


Guest Reinhard
 Share

Recommended Posts

Guest Reinhard

Hello,

Can someone tell me how I can read MIDI in a PIC and put the databytes on a parallel output. If you can send me the code that would be OK to  ;). I am using the PIC18f877 if you have it with another PIC its ok to.

Greetz,

reinhard

reinhard@talenttechnologies.be

Link to comment
Share on other sites

I think what you need is a MIDI core with one DOUT module, and maybe a DIN. (DOUT and DIN not fully stuffed with pics). You can use the DOUT as parallel interface. I don't know how parallel interfaces work, but isn't it something like you set the parallel pins and the other end will accept the code if a some 'receive' pin is set?

So the program should set pins according to what midimessage is set.

In this way you can use MIOS code (that's for PIC18F452) and will have to write an application that will transform midiin data to DOUT data. But as I said, I don't know how parallel works so I don't really know how to do this.

I just took a look at http://computer.howstuffworks.com/parallel-port1.htm

Pin 1 of the parallel port has normally a level between 2.8 and 5 volt, but will drop if data has to be sent.

Pin 2-9 carry the data bytes.

So first you have to assign the data bytes to a DOUT, and then drop 'Pin 1' below 0.5 volt.

I don't really know how it all works, but DOUT uses shift registers, which is fine for the data, but this way it's hard to maintain Pin 1 at high voltages if Pin 1 is part of DOUT.

MIOS can handle midiindata and the DOUT module, but you will have to find a way to keep pin 1 high, until DOUT is set.

I hope this helps somewhat. Are you using the parallel port of a PC as an MIDIinport? If so I think other people are interested and it would be nice if you can publish your result at this website somewhere.

Yours

Rednas

Link to comment
Share on other sites

More ideas.

MIOS is equiped with a midi sendbyte routine, which will send a byte on the right pin to midi-out. What you have to do is alter this routine to let it send data to a shift register (Dout), and when all the data is in the shift register you have to clear another pin to let the other side know you are sending a midibyte. I don't know yet how to do this, but if you are an experienced PIC programmer maybe you do.

Another idea is to put a shift register at midiout, but to control it you need at least two pins.

Link to comment
Share on other sites

  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...