Since the 1980s, MIDI has been a great way to send data between electronic musical instruments. Beginning as a modified serial interface running through optoisolaters and DIN sockets, these days, your hardware is more likely to carry its MIDI data over USB instead. This is great if you want to hook up to a computer without a cumbersome interface, but not so great when you want to connect a bunch of instruments to each other.
The Roland Integra 7 is a rack mount synthesizer with classic MIDI ports. [adriangin] wanted to control the synthesizer over MIDI, but their Casio keyboard only had MIDI over USB available. To get around this, [adriangin] set out to add a standard MIDI Out port to the Casio PX410R.
If you want to be a hardware hacker, get familiar with standard serial communications. After some probing around the test pads while playing with the keyboard’s sustain pedal, [adriangin] found what looked like a MIDI signal between two ICs, but at a non-standard bitrate. The hunch turned out to be correct – the signal was going between the synthesizer DSP chip & the IC handling the USB connection. The standard MIDI interface operates at 31250 baud, while this signal was at 215500 baud. There’s no simple way to convert from one baud rate to another, so [adriangin] had to do it the hard way.
An Atmega32P was pressed into service, using a soft UART implemented on a digital pin to run at 215500 baud. At such a high bitrate, the soft UART required some cycle-accurate assembly programming to get everything humming along. The data would then be repeated over to the hardware UART running at 31250, which was wired to a standard DIN plug as used in classic MIDI. It’s a useful hack that allows the keyboard to work with a much wider range of hardware. It’s topped off by its clean execution, with the new port neatly integrated into the rear panel.