[net.music.synth] "Cheap" MIDI interface

ian@wcwvax.UUCP (Ian Kemmish) (02/17/86)

This is only cheap if you already own a PC, of course!

I'm probably not the first to discover this, but I haven't
seen it mentioned on the net yet.  Despite what all the IBM
documentation says to the contrary, you CAN run the 8250 UART
that PCs and clones use at 31.25Kbaud.   If you replace the
1.8432MHz crystal with one at 2.0MHz, and poke a frequency
divisor of 4 into the UART, everything goes just fine.  Of
course, this will screw up the UART as far as everything else
in the world is concerned, so it's probably as well to socket
the crystal so you can change it back again. . .  Also, the BIOS
call for initialising the UART won't cope with a divisor of 4,
so you'll have to poke it in by hand from a short assembler
function.   If you're using the IBM serial adaptor, then you
already have a current loop interface (but remember you will have
to change the values of a couple of resistors to change it from
20mA to 5mA); otherwise you will have to knock one up yourself -
it's not too difficult.
It's certainly a lot cheaper than the $200+ I've seen most interface
boards advertised at!

On the software side, you will have to implement an interrupt-driven
driver for COM1, and if you want to do real-time sequence capture,
you'll need to timestamp events too.  I'm currently working on one
to interface to Lattice-C, using a getc()-like interface.  If there's
enough interest, I'll post sources to the net.