Notice: Skip this blog if your Electone or MIDI device has a USB TO HOST port. In this case, just connect with a USB Type B cable.

MIDI Port

After learned some basic electronics in university, I was so surprised when I found that the DIN-5 MIDI port seen on almost every electronic keyboard is a simple UART transceiver with a baud rate of 31250. It works similarly to 9-pin COM port seen on older PCs. The only difference is that MIDI use current signal while COM use voltage.

So it’s possible to build a simple adapter to connect our MIDI to COM, and I would say it’s preferable to connect this way. Why?

You may have been recommended to use a dual-DIN-5 MIDI to 15-pin joystick cable and an MPU-401 compatible sound card, or a USB-MIDI adapter. They both add unnecessary complexity to the signal path. MPU-401 might be okay, but USB would be a nightmare for such real-time application, especially if the adapter is not of good quality. (Haven’t made experiment myself, but I do know a little about the USB protocol and a couple of USB-COM adapters)

Besides the similarity between MIDI and COM, Electone, and some other MIDI devices, even have a TO HOST port which can be directly connected to COM port, without any semiconductor in between. It’s amazing because you can even make a cable yourself or buy one at very low price. The UART parameters are similar to MIDI: 8 data bits, 1 start bit, and 1 stop bit, but the baud rate is higher: 38400 (If PC-2 is selected via HOST SELECT switch on my EL-700. To my understanding, the only difference between PC-1 and PC-2 is baud rate). In fact, the Owner’s Manual does mention this type of connection, but the cable it describes seems to be hard to obtain, and no further details are given.

One of my friends kindly offered me a copy of EL-700 Service Manual, which contains the schematics of almost all PCBs inside the instrument. So I can figure out the correct pin-out of TO HOST port, although several versions of TO HOST – COM pin map exist online. I will put the reason why I recommend this set of pin map at the end of this blog.

Mini-DIN 8 (left) and D-Sub 9 (right) Plug

The two pictures above are TO HOST jack (male) and COM jack (female) being seen from the end-on. Care should be taken not to make a mirrored version instead. Pin number may be labeled on a COM jack. As for TO HOST port, pay attention to the spacing between pin 3, 4 and 5. The space between pin 3 and pin 4 is smaller than that between pin 4 and pin 5. You won’t make mistake!

Pin Map
Signal Mini-DIN 8 (TO HOST) D-Sub 9 (COM port)
Electone to PC 3 2
PC to Electone 5 3
GND 4 5
A signal should be connected to GND 8 5, or connect with 4 at Mini-DIN 8 side

 

After connecting your Electone to COM port, there is still one problem to be solved. Most of the sequencers or DAW software doesn’t support COM input, so you must make a virtual MIDI device using a software, which relays messages between the COM port and the virtual MIDI device. There are a couple of open source solutions.

If you have a PC running Linux (It’s rare but I know it exists because I use Linux everywhere), there’s an even simpler CLI program for you: ttymidi. Just type following command and hit enter:

ttymidi -s /dev/<tty_for_your_com_port> -b 38400

If you want to know what the hell is happening, just add a -v to the end of the command above.

Explanation

TO HOST schematic of EL-700

The picture above is the schematic of TO HOST circuitry. Signal MIDI_OUT and MIDI_IN come from the “motherboard” (DM-CN3) and is connected to a UART transceiver of the CPU there. You can see that if HOST SELECT switch points to MIDI (top), MIDI_OUT and MIDI_IN will be routed to MIDI board, where there are current driver and receiver. But if HOST SELECT is at other positions, they are connected to LINE DRIVER, which is a chip manufactured by TI, SN75C1168.

There seems to be some typo on the LINE DRIVER schematic, I believe that:

  • Pin 2 should be labeled “IN1+” instead of “I 1+”;
  • Pin 15 should be “IN 1” instead of “IN”;
  • Pin 14 should be “OUT 1+”;
  • Pin 13 should “OUT 1-“.

Function Tables and Logic Diagram of SN65C1167/68

The image on the left is captured from SN75C1167/68 datasheet. The MIDI_OUT signal is connected to pin 15. As can be seen in Logic Diagram (our chip is at the right side), it is converted to a pair of differential signal. Because COM port has negative logic (low for “1” and high for “0”), we connect the inverted signal — pin 13 of the chip — to the input of COM port. We connected the output of COM port to pin 1, which is inverted input and pulled Pin 2 to GND, thus differential input can be achieved. One thing should be noted is that if PC send a “1” (low level), the voltage difference is around 0V, and the output on pin 3 of the chip is indeterminate (see the ? mark in the table). This is the time when the pull-up resistor (R13 in the schematic) comes in handy.