hardware for midi interface

Kecked

Member
I found the attached hardware for interfacing with midi in and out. Can anyone tell me why they use the 7404 hex inverters to invert and then undo the inversion. Is that just to buffer? Why not use the optocoupler on both the input and output?

Rename the attachment .bmp
 

Attachments

Kecked

Member
rename the attachment to .bmp its a windows bit map ie the file name is midiinterface.bmp The forum would not take it unless I smashed the size to something small.
 

Jamster

Senior Member
You dont need them with PICAXE, a quick search for MIDI will throw up some of Hippy's code and diagrams. I dont know about the opto-isolator though, I've only tried MIDI output so haven't had to use it, although would be interested...
 

hippy

Technical Support
Staff member
Is that just to buffer?
I would say yes. A first 74xx to provide the sink capability, then, because that inverts the polarity, another is added to get it the right way again.

Why not use the optocoupler on both the input and output?
An opto for output driving could be used if the rise and fall times meet the MIDI specification, but it's an expensive component compared to a simple transistor. You also have to provide enough current to drive the LED but limit the current to prevent damage. Of course a transistor needs a base resistor. A logic gate is much easier and why they probably got used.

There are probably hundreds of different ways to do it but what tends to happen in practice is people don't fully understand the big picture so slavishly follow existing designs which get copied and tweaked. Why it's being done that way or why one component is used rather than another gets lost to history.

Using an FT232BM as here, it seems there is no need to use any output buffering. However, using a buffer does add a degree of separation for an adverse event that might damage the output.
 

Kecked

Member
Thank you. That helps a lot. I think I'll follow the 7404 7404 since it cleans up the pulse, isolates, and give drive capability.
 

hippy

Technical Support
Staff member
Thank you. That helps a lot. I think I'll follow the 7404 7404 since it cleans up the pulse, isolates, and give drive capability.
Whereas I'd have gone with direct drive from a PICAXE on the grounds the signal doesn't need cleaning up, the risk of damage is minimal so isolation is mostly unnecessary, the PICAXE has plenty of drive capability, and it's one less thing to wire-up or find space for.
 

Kecked

Member
point taken worst case I loss a $5.00 part. Funny thing is how much extra space I have in this project. It's 4 chips among 32 16mm pots and the parts are surface mount! IF I can find concentric LINEAR pots that will drop to 16 pots but they are either all audio taper or $30.00 each. The utltimate would be concentric linear pots with spdt switches and bipolar leds built in to the center shaft. I did however find really nice spdt switches with the bipolar leds.
 
Top