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:
;;
SWITCHBANK_0_1
movlw (1 << TXEN) ; set baudrate: 31250
movwf TXSTA
movlw 0x09
movwf SPBRG
SWITCHBANK_1_0
must be changed to:
SWITCHBANK_0_1
movlw (1 << TXEN) | (1 << BRGH) ; set baudrate: 38400
movwf TXSTA
movlw 0x20
movwf SPBRG
SWITCHBANK_1_0
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.
Its the bit at the end I don’t understand… does this mean it is possible to create a serial midi interface to use with any generic midi device? or does it mean that only a midi serial input (output not possible?) can be created by combining the midi-merger project, and the MAX232?
thanks, from Steve