Sound Mover - Marc Marc
MIDI to Parallel interface
The data interface that is presented here can be used for many purposes. It converts a serial input data stream to a 8 bit parallel output plus strobe pulse. The input data is Galvanicly insulated by an Opto Coupler. Electrically it is compatible with the MIDI standard (serial format 1+8+1, drive current of the Opto coupler and the Baud rate) but, you could modify the circuitry for any other specification.
The diagram below shows you a MIDI interface that has a parallel output. Both the SM132
and V8 unit use one to have them controlled by the MIDI port of the Atari ST. When speaking
about MIDI you have to realize that the MIDI protocol and the interface are two different
things. The MIDI protocol is an industrial agreement (standard) between manufactures of
musical instruments that describes by what numbers and how many (data bytes) certain
parameters of the instruments will be controlled. The MIDI interface is an agreement on the
electrical specifications of the hardware interface that sends and receives the data stream.
. . . Discrete design
It would be possible to design this interface with a micro controller but as it turned out
this would not count much less parts than as it is designed now. When a micro controller
should have been used there would be the need to have it programmed in assembler to be fast
enough or otherwise an expensive controller should have been used. Also a good Watch Dog
should have been implemented to take care about system errors. All together this did not
made it very attractive to use a micro controller. That's why I researched the
possibility to design it with standard HC chip's. As you can see this was a success.
. . . Data Input
Conform the MIDI standard the serial data at the input is fed to an Opto Coupler to
insulate the receiver electrically from the sender. This has the advantage that no grounding
problems between individual units occur. Another advantage is that the Opto Coupler is
actually current driven rather than by a Voltage. The drive current is standardly set at a
5 mA rate. This makes it possible to use a 10 meter connection cable between the sender and the
. . . Data Conversion
Shift register 4094
The 4094 transfers each data bit at its input (pin 2) sequential to its outputs (pin 0..7) at the command of the rising edge of a clock pulse (pin 3). The result is that a sequence of 8 data bits will appear as parallel data at the outputs after a cycle of 8 clock pulses is completed. The control logic responds to the start and stop bit of the input data to serve the 4094 with a correct timed clock pulse sequence to convert the input data.
At the moment that the start bit comes in (high to low level jump of 6N136 collector
output) the Flip Flop I will be set after a certain delay time (set with P40). This will
cause the Q output of FF-I to jump high, the ring counter 4017 will be resetted and the
baud rate generator (N1 and N2) will be enabled. The baud rate generator will generate a
sequence of pulses to control the 4094 shift register. The first pulse that the baud rate
generator generates after being enabled will be after half the time of its baud rate.
Together with the delay time that is set with P40 at input of FF-I the first clock pulse
comes exactly at the middle point of the first data bit from the input (thus the second bit of
the serial data byte).
. . . Baudrate
As was already mentioned, the baud rate needs to be the same as that of the sender.
The MIDI standard is 31.250 Baud which is the same as a clock period of 32 milliseconds.
With an oscilloscope or frequency counter the baud rate generator needs to be set at this
proper rate by trimming with P2. When for C8 a styroflex precision capacitor is used, for
R2 metal film and for P2 cermet, then a center trimmed P40 will set the baud rate already
close to its proper rate.
. . . LED indication
The Led indication has two LED's: a red and a green one to create a visual check indication for the data receiving. In the diagram you find the two points that connects to the LED drivers. The red LED is connected to FF_I and will lit when data comes in. The green LED is connected to the 9 output of the 4017 and its when the data is received (constantly when no data is coming in).
For response see Marc Marc contact file
This page and all contents: (C)1996 by Marc Marc Amsterdam