[sdiy] MIDI specifications

Gene Stopp gene at ixiacom.com
Thu Apr 17 02:15:27 CEST 2003


Hey I remember that from my RS-232 datascope days...

Async data means there are no bits on the wire when there is no data being
sent. Let's say the wire has two states, high and low, and when there is no
data it's high. The Start Bit is a low for one bit time. The next bit time
can be either high or low, and that bit is the first bit of the byte
(usually the one on the left if you write the byte 1001XXXX, for example).
The rest of the bits continue as either high or low, as expected. The first
bit time after the last bit of the byte must be high, and this is the Stop
Bit. Sometimes you will hear the term "Two Stop Bits", and what this really
means is that there is a minimum separation between the last bit of the
previous byte and the start bit of the next byte of two bit times. In other
words, the Stop Bit is really part of the dead time between bytes which can
be any amount of time, up to infinity.

Since the Start Bit is required, and at least one Stop Bit is required,
every byte on the wire is considered to occupy 10 bit times.

As for the physical layer connections and circuitry, the MIDI 1.0 spec
diagram is a great reference for that. I don't have it memorized and I don't
have it handy, but somebody might be able to send you that page or you may
be able to find it on the web.

Best Regards,

- Gene

-----Original Message-----
From: Blitzcraig [mailto:blitz at nmt.edu]
Sent: Wednesday, April 16, 2003 4:54 PM
To: synth-diy at dropmix.xs4all.nl
Subject: [sdiy] MIDI specifications



hey all, got the code compiled for my sequencer, but I'm having troubles
with the MIDI specifications, i.e. timing and pins.

MIDI specification says it's Asynchronous serial, baud rate is 31.25 Kbaud
and a serial byte has 1 start bit, 8 data bits and 1 stop bit.  I
understand how there's a status byte followed by two data bytes, but I
don't see how it's 10 bits as described above.  Maybe I don't understand
the concept of asynchronous serial?  As a I see it, note on will be...

status:  1001XXXX
key:  0XXXXXXX
velocity: 0XXXXXXX

I send this out of my microcontroller, with a 40ms delay between bits
(MIDI spec says 320 ms per serial byte)?  Am I understanding this
correctly?  Where does the start bit and stop bit come into play?

Second question is about MIDI port wiring, pin 1 & 3 are not used, pin 4
and 5 are pair?  Which pin is sending the serial data?  Which pin is tied
to my microcontroller ground, etc.

thanks for your help, I hope you could understand my amature questions.

-Joe



More information about the Synth-diy mailing list