Guest Reinhard Posted October 7, 2004 Report Share Posted October 7, 2004 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,reinhardreinhard@talenttechnologies.be Quote Link to comment Share on other sites More sharing options...
lemonhorse Posted October 7, 2004 Report Share Posted October 7, 2004 How about: http://www.ucapps.de/midio128.htmlThe MIDIO128 interface enables you to drive up to 128 digital output pins and to react on up to 128 digital input pins via MIDI.- Lemonhorse Quote Link to comment Share on other sites More sharing options...
Rednas Posted October 7, 2004 Report Share Posted October 7, 2004 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.htmPin 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.YoursRednas Quote Link to comment Share on other sites More sharing options...
Rednas Posted October 10, 2004 Report Share Posted October 10, 2004 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. Quote Link to comment Share on other sites More sharing options...
DrBunsen Posted October 26, 2004 Report Share Posted October 26, 2004 http://www.harmony-central.com/MIDI/interface.html Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.