c64midi-interface.txt

(36 KB) Pobierz
The following text is a construction article for building your own MIDI
interface for the Commodore 64 or Commodore 128 cartridge port.  If you are
used to building digital electronic projects, you should be able to put one
together in a few days for about $25 worth of parts.  However, this is not
a project for the inexperienced - wiring this circuitry onto a board small
enough to fit into a cartridge case requires a good eye, a steady hand, and
a lot of patience.

If you don't even know what a MIDI interface is, it means Musical Instrument
Digital Interface, and is used to communicate with MIDI capable musical
instruments.  MIDI is an electronic music industry standard.  The C64 was
one of the first computers to be used extensively for MIDI applications.

Don't even think of downloading this file to your C64, there is absolutely
no reason to do so, since it is just a text file that you can print on your
local host, and besides it contains lots of characters that aren't even on
some Commodore compatible printers.  When you print this out, make sure you
allow a full 66 lines per printer page in order to fit the schematic on one
page by itself.

Following the construction article is a PostScript program which you can send
to an Apple Laser Writer (or any PostScript compatible printer) to get a really
high quality printout of the construction schematic.  But don't fret if you
don't have access to one of these - the ASCII version of the schematic below
is quite servicable.

If you do build this MIDI interface, or simply buy one, be sure to look for
my package "The MIDI-SID CONNECTION", to be uploaded to the UXMAZE server soon.
I will also entertain the idea of uploading other public domain MIDI software
if there is enough interest.  Just let me know.

Sincerely,
Frank Prindle
Prindle@NADC.navy.mil


----------------------------------cut here-------------------------------------
               ____ COMMODORE 64 TRI-STANDARD MIDI INTERFACE              
              |xtal|                                       .----------.
   *----------|-||-|----------*         *------------------|11      14|----<+5V
   |      2Mhz|____|          |         |                  |  74LS293 |
   |                          |         |               *--|4   12   7|----*   
   *--\/\/\--*      *--\/\/\--*         |               |  '----------'    |
   |    2.2K |      |    2.2K |         |    15    1    |        |         |
   |  |\     |      |  |\     |  |\     *-----@    @    @        *---------*
   |  | \    |  ||  |  | \    |  | \    |          |   16                  |
   *--|  >o--*--||--*--|  >o--*--|  >o--*     *----*                       V
      | /  500pf||     | /       | /          |    |     *---<+5V         GND
      |/               |/        |/         Rx|  Tx|     |
                                           CLK| CLK|  Vcc|
                +5V>-----*----\/\/\---*     .--------------.
                         |     270    |     | 3    4    12 | ___    ___
MIDI-IN DIN Jack     .-------.        |     |             7|-IRQ--->IRQ (Pin 4)
 5<>--------------*--|2  6   |        |     |              |
                  |  |      4|--------*--Rx-|2           10|-CS1------------@14
 2<>--N/C   diode V  |  PC-  |          DATA|              |
                 --- |  900  |              |            11|-RS---->A0  (Pin Y)
            220   |  |      5|------*       |              |   _
 4<>-------\/\/\--*--|1      |      |       |            13|-R/W------------@12
                     '-------'      V       |     6850     |
                                   GND      |     ACIA   14|-E----->02  (Pin E)
                      /|       /|           |              |
MIDI-OUT DIN Jack    / |      / |           |            15|-D7---->D7 (Pin 14)
 5<>----\/\/\------o<  |----o<  |--------Tx-|6           16|-D6---->D6 (Pin 15)
         220         \ |      \ |       DATA|            17|-D5---->D5 (Pin 16)
 2<>---*              \|       \|           |            18|-D4---->D4 (Pin 17)
       |                                    |            19|-D3---->D3 (Pin 18)
       V                                    |            20|-D2---->D2 (Pin 19)
      GND   220                 |\          |            21|-D1---->D1 (Pin 20)
 4<>-------\/\/\---<+5V         | \         |            22|-D0---->D0 (Pin 21)
                            *---|  >o-*-CS0-|8             |
                            |   | /   |     | 9   5 1 23 24|
        |\                  |   |/    |     '--------------'
        | \             |   |         @       |   | | |  |
A6 <----|  >o-----------|2  |         4   @---*   *-*-*--*-------*
(Pin S) | /             |   |            11  ___  _   _ ___      |
        |/   |\         |   |                CS2  R V D CTS      V
             | \        |   |                     T s C         GND
A5 <---------|  >o------|1  |                     S s D    
(Pin T)      | /        |   |       
        |\   |/         |   *-----*   
        | \             |--_      |                       6@------->A1 (Pin X)
A4 <----|  >o-----------|3  \     |                                            
(Pin U) | /             | 74 \  8 |                       2@------->A2 (Pin W)
        |/   |\         |LS30 |o--*                                            
             | \        |    /                            3@------->A3 (Pin V) 
 @-----------|  >o------|12 /                                         _        
13           | /        |---                              5@------->R/W (Pin 5)
        |\   |/         |                                                      
___     | \             |                    
IO1<----|  >o-----------|11            NOTES:
(Pin 7) | /             |              1. All inverter/buffers are (1/6)74LS366
        |/  +5V         |                 with pins 1, 8, and 15 grounded; pin
             ^      *---|4                16 supplied with +5V. 2 chips needed.
             |      |   |              2. A .01 uf bypass capacitor from Vcc to
+5V<---------*------*---|5                GND at each chip is not a bad idea.
(Pin 2)             |   |              3. The PC900 optoisolator available from
                    *---|6                MIX Bookshelf, 6400 Hollis St. #12,
        7   GND     |   |                 Emeryville, CA 94608; price $3.00 PP.
        @    ^      *---|14(Vcc)       4. All (Pin #) numbers refer to the C64
        |    |          |                 cartridge port connector CN6.
GND<----*----*----------|7 (GND)       5. All @ symbol numbers refer to pins on
(Pin 1)                 |                 a 16-pin personality select socket.


This interface must be configured for a particular standard by plugging
jumpers (or a jumpered DIP header) into the personality socket.  The jumpers
required for each standard are as follows:

    Passport Standard        Sequential Standard        Siel/JMS Standard
    -----------------        -------------------        -----------------
         1 - 16                    1 - 16                     1 - 15
         3 - 14                    4 - 14                     2 - 14
         2 - 13                    3 - 13                     3 - 13
         5 - 12                    6 - 12                     6 - 12
         6 - 11                    2 - 11                     7 - 11


To add a MIDI-THRU output jack, it will be necessary to add another 74LS366
chip, since two more inverters are required.  Simply connect the output from
pin 4 of the PC900 optoisolator to the following circuit in addition to pin
2 of the 6850:
                                                    
                      /|       /|    
MIDI-THRU DIN Jack   / |      / |    
 5<>----\/\/\------o<  |----o<  |--------- from pin 4 of PC900
         220         \ |      \ |
 2<>---*              \|       \|
       |
       V
      GND   220
 4<>-------\/\/\---<+5V


A 6N138 optoisolator is the only acceptable substitute for the PC900.  It is
available from retail parts distributors such as Active Electronics.  Its pin-
out is different:
                      PC900 Pin         Corresponding 6N138 Pin
                         1                         2
                         2                         3
                         4                         6
                         5                         5
                         6                         8

Radio-Shack optoisolators are not an acceptible substitute!

Resist the temptation to ground the outer shell contact of any DIN jack, or
pin 2 of the MIDI-IN DIN jack.  Doing so violates the MIDI standard and can
cause all sorts of ground-loop problems depending on the cables used.  The
MIDI interface sold by DATEL has this flaw.

Please consult the Motorola MC6850 Data Sheets for details on programming the
6850.  As you can see, all three interface standards are very similar.  The
differences are in the frequency of the 6850 clock and the addressing of the
6850 registers.  These differences are summarized in the following table:

                                 Siel/JMS      Passport     Sequential
 Control Register Address          DE04          DE08          DE00
 Transmit Data Register Address    DE05          DE09          DE01
 Status Register Address           DE06          DE08          DE02
 Receive Data Register Address     DE07          DE09          DE03
 Master Chip Reset Command          03            03            03
 Enable Xmit/Rcv Command            ...
Zgłoś jeśli naruszono regulamin