English Version French Version

MIDIbox-to-COM Interface

Created in January 2002

The MIDIbox-to-COM interface enables you to connect the MIDIbox to a COM (RS232) port instead of a MIDI port. It saves one MIDI-IN and one MIDI-OUT for your MIDI equipment. The data is transfered about 20% faster than via MIDI.

Hardware Requirements

The MIDI interface of the MIDIbox must be replaced by a RS232 interface. The MAX232 chip does this simple job, it just shifts the TTL voltage levels of the PIC to the -12/+12 V levels of the RS232 port.


Driver Requirements

I tested the RS232 interface with the CBX serial port driver by Yamaha and noticed no problems. :)
The Roland Driver works also fine (search for serial MIDI driver)!
And here a third driver, provided by Kawai for the K5000 workstation. Nenad reported that the two driver above failed on his computer, but the (much simpler) Kawai driver works.

Firmware Requirements

PIC16F: The RS232 interface is supported by MIDIbox Plus since v1.908, MIDIbox64, MIDIbox16E, MIDIbox64SEQ and MIDIO128.

PIC18F (MIOS): MIDIbox-to-COM is part of the operating system. See also the functional description of MIOS_MIDI_InterfaceSet.

How to plug a MIDI device to a MIDIbox with MIDIbox-to-COM Interface

This could work with the MIDI Merger project. To use the Merger as a baudrate converter, just change following lines in the MIDI Merger source code:

;; code located in init.inc, function: Init_USART:
        movlw   (1 << TXEN)     ; set baudrate: 31250
        movwf   TXSTA
        movlw   0x09
        movwf   SPBRG

must be changed to:

        movlw   (1 << TXEN) | (1 << BRGH) ; set baudrate: 38400
        movwf   TXSTA
        movlw   0x20
        movwf   SPBRG

On this way, the Hardware UART is clocked with 38400 baud, but the software UART runs with the MIDI baurate anymore. Following interconnections are necessary:

  • MIDI In1 of the merger to MIDI-Out of the MIDI device (i.e. a MIDI Keyboard)
  • MIDI In2 of the merger directly - without optocoupler - to the output of the MAX232 (Pin 12)
  • MIDI Out of the merger directly - without optocoupler - to the Rx port of the MIDIbox-PIC.


File Size Description
midibox_com_schematic.gif 9k RS232 Interface
MBHP LTC LINK This PCB provides a MIDIbox-to-COM port
Testing the RS232 interface
PIC16F MIDI Troubleshooting LINK HowToDebug the MIDI Interface

Last update: 2024-05-08

Copyright 1998-2023, Thorsten Klose. All rights reserved.