Decoding MIDI with discrete logic

Edward Leckie eleckie at cochlear.com.au
Fri Apr 30 05:31:13 CEST 1999


     Hi,
     
     A coupla years ago I started building a simple MIDI->CV box out of 
     discrete components. The circuit was based on a circuit from a R.A. 
     Penfold book which contained a MIDI comparator circuit. The main 
     components used were a 6402 UART (which is hardware programmable 
     unlike those 8250/1 which are software programmable) and a 74HC688 
     (8-bit comparator). I would advise, if you are going to pursue a 
     hardware only approach to use a UART over a shift register. On the 
     6402 UART, you can set 1 start bit, 1 stop bit and no parity bit (the 
     MIDI standard) by tying certain pins high or low.
     
     Good Luck!!
     
     Ed.
     
     


______________________________ Reply Separator _________________________________
Subject: Decoding MIDI with discrete logic 
Author:  <WeAreAs1 at aol.com> at Internet
Date:    29/4/99 19:36


Hello list,
     
I have a need for a couple of boxes that will decode a simple MIDI message 
and output a high or low logic signal.  I have absolutely no software 
programming skills, so I cannot use a microprocessor or PIC device to do 
this, even though that might be the most efficient method.
     
The MIDI message would be a continuous controller (the controller number is 
as yet to be determined - probably one of the less often used ones).  I want 
the logic gate output to go high, and stay high, whenever this particular 
controller is received with a value of 64 or higher.  If the decoder circuit 
receives that same controller with a value of 63 or lower, the logic output 
would then go low, and stay low.
     
I am wondering about using discrete logic IC's to do the job, and I'd like to 
know if others have made similar attempts.  I haven't yet tried to work out 
the details on paper, but in my head I've figured out some rough ideas:
     
I would clock the incoming serial MIDI data through a few cascaded 
serial-to-parallel shift register chips (74ls164 or similar), and send the 
3-byte parallel output to a few "equality/magnitude comparator" chips 
(74ls686 or similar), one chip for each byte: Status/Channel, Controller 
Number, Value), to be compared with the specific preset MIDI byte that they 
need to respond to.  The first two comparators (looking at the Status/Channel 
and Controller Number bytes) would be in "Equality Comparator" mode, and 
their outputs would be AND'ed together to give a True output if they both 
exactly agreed with the preset bytes.  I would use "Magnitude Comparator" 
mode for the last byte (Controller Value) and would compare the incoming byte 
with a preset byte having a value of 63, so the magnitude comparator output 
would go True for any Value bytes greater than 63, and go False for any bytes 
valued 63 or lower.  The output of the third comparator would then be AND'ed 
with the output of the previously mentioned AND gate (the "True" signal from 
the correct Status and CC# bytes), and that would be my final output.  
Hopefully, the MIDI Stop Bits would allow the Serial-to-Parallel converters 
to keep track of the incoming MIDI bytes, and the comparators and associated 
logic would simply ignore all incoming MIDI messages except the important 
one.  
     
Obviously, I haven't completely thought this out, and there is probably a 
more elegant way to do this, but am I at all on the right track here?  Is 
there a simpler way to do this (without using a microprocessor)?  What are 
some traps that I must watch out for?  I've seen some circuits that use a 
UART chip, hard-wired with some external logic, to achieve a similar result, 
but I didn't really understand them (I couldn't find enough background 
material about the inner workings of the UART chips).  Has anyone done any 
non-microprocessor MIDI stuff with any of those types of devices?  (6502, 
AY-1013, AY-1015, etc.)  Do you know where I can find data sheets on them?
     
If any of you have built MIDI devices using discrete logic, I'd love to see 
your circuits.  Even if their purpose or function is completely different 
than the one I have described, I'm sure that I would still learn something 
useful from them.
     
Best regards,
Michael Bacich
     
P.S. - Yes, I know that MIDI Solutions makes a nice little box that will do 
what I need done, but that wouldn't be DIY, would it?
     




More information about the Synth-diy mailing list