[comp.sys.atari.8bit] Homemade MIDI Interface -- Part 1 of 2

terpin@acsu.buffalo.edu (christophe d terpin) (03/28/91)

Homemade MIDI interface for the Atari 8-Bit
-------------------------------------------
Parts List:
1   7404 TTL Hex Inverter OR 7400 NAND gate
2   220 ohm resistors (10%)
1   Atari serial port plug for your computer
2   5-pin Midi plugs (RCA) for your midi keyboard
1   breadboard/experimenter perf board
1   project case
approx. 10 ft. of 3 wire cable 
twist ties to tie down wires etc..


The serial port pins as seen on the computer are:
     
     2    4   6   8   10   12
      o   o   o   o   o   o  
    o   o   o   o   o   o   o
    1   3   5   7   9   11  13

   	1 - Clock In		7 - Command
	2 - Clock Out		8 - Motor Control
	3 - Data In		9 - Proceed
	4 - Ground		10 - +5V
	5 - Data Out		11 - Audio In
	6 - Ground		12 - +12V  	13 - Interrupt

For this project, we will only need to use pin #'s 3,4,5, and 10 of the
serial port.
---------------
(CRUDE)                                         Ground (pin 4)
SCHEMATIC:          7404                         |
                  |\    |\                      2|  
	          | \   | \    220 ohm       5   o   4
data out       ---|  O--|  O---\/\/\/---------o     o---/\/\/\/-- +5 (pin 10)
from computer     | /   | /                  3 o   o 1
(pin 5)	          |/    |/                  MIDI OUTPUT cable to synth  
   
     	    2
 	 5  o  4
Ground---o     o------------(optoisolator)------- data in to computer
        3 o   o 1                                 (pin 3)
     MIDI INPUT cable
      from synth

Pins 1,3 of the Midi Output cable and pins 1,2,3 of the Midi Input
cable are not connected.

The optoisolator is optional, although it is recommended for extra
protection for your midi keyboard.  I have used the interface 
hard wired without the optoisolator without any problems (so far).

Also note: the normal serial i/o to the disk will sometimes interfere
with the midi interface and vice versa.  This sometimes results in 
a note sounding on the synth when loading or saving a file, or the
disk will glitch if you try playing the keyboard during disk i/o.
One possible way to remedy this annoying problem is to replace
the 7404 with a tri-state buffer which can be turned to a high-Z state
using the motor control (pin 8) from the serial port. 

Anyway, BE CAREFUL and check all your wiring before you hook the 
interface up to the synthesizer.  

Please let me know if you have any suggestions for improving the 
interface.

next::  BASIC Midi Recorder Program
	New & Improved Assembly Source Code

---------------------------------------------------------------
Christopher Terpin
terpin@autarch.acsu.buffalo.edu