Midi, serial ports, uart's and the compaq aero

David MOYLAN moylan at eden.rutgers.edu
Thu Oct 8 17:48:03 CEST 1998


I've been looking into using my compaq aero for midi
lately: controller, sequencer, composer, etc.  Of
course, I'm also looking for the most elegant solution
(read minimum external hardware).  The problem with using
the serial port directly is usually incompatible baud rates.
Midi uses 31.25 kHz.  In between the standard 28.8 and 33.6.
Serial ports are basically a UART chip (parallel to serial 
converter for the most part)  The aero uses a 16550 UART.

1. The clock on a 16550 runs at 16 times the baud rate.
   For Midi we would need 500 kHz.
   
2. This 16X rate is selected by setting a 16 bit register
   in the 16550.  The number stored in this register
   is used as a divisor against the clock being fed into the
   16550.

The most common clock frequencies for the 16550 are 1.8432
and 18.432 MHz.  This is the real problem.  There's no
integer divisor to get 500 kHz.  However,  after a quick
look inside the aero yesterday (I was actually thinking 
about changing the crystal), I believe the aero uses a
24 Mhz crystal.  24 Mhz / 48 = 500 kHz -> 31.25 kHz baud.

So it appears a little programming is all that's needed to
use the serial port for midi data.  This of course extends
to any computer with a 16550 running at 24 MHz.  I must say
though that I was a bit rushed when I made this discovery,
so if anyone can offer some validation or contradiction it 
would be appreciated.

These doubts arise due to the fact that getting 14.4, 28.8
etc from 24 Mhz doesn't work out to perfect integers.
But seeing as this is a portable with a pcmcia slot, the 
designers could have been thinking that a modem would usually
be in the slot and not on the serial port.

Hope this isn't a screw-up....dave moylan






More information about the Synth-diy mailing list