1. Purpose and Scope
The MC6850 supplies one full-duplex asynchronous serial channel for MIDI. The board has a galvanically isolated MIDI input, a software controlled MIDI output, and a hardware THRU output that copies the isolated input while the computer is powered. The THRU path does not pass through the ACIA or depend on firmware.
The Memory Map owns the slot and
register addresses.
Bus and Address Decode owns
IO5_n, the completion tree, and timeout behavior. The
MFP owns GPIP4 and vector
$46. The
MFP clock section owns
MFP_CLK_5.
Signal names ending in _n, and signal names written with
a leading slash, are active low. The board uses +5 V logic and
through-hole packages. Every IC family and ordering code selected here
was documented before 1994.
2. Architecture
MC68EC000 lower byte MC6850P and MIDI ports
D7..D0 <--------------------------> D7..D0
+----> U_MIDI_RDATA D inputs
<---- U_MIDI_RDATA Q outputs after an ACIA read
A1 --------------------------------> RS
R/W -------------------------------> R/W
IO5_n + LDS_n --> MIDI_CYCLE ------> request synchronizer
MFP_CLK_5 --> local buffer --------> synchronizer and adapter clocks
+-- divide by 10 -----> MIDI_CLK_500K
+--> MC6850 E, Tx CLK, Rx CLK
request --> SELECT --> DONE --> ACK_READY --> MIDI_DTACK_n
|
MC6850 /IRQ -- 4.7 kohm pull-up ------+--> MC68901 GPIP4
MIDI IN --> 6N138 --> two LS14 stages --+--> MC6850 Rx Data
+--> LS07 --> MIDI THRU
MC6850 Tx Data ------------------------------> LS07 --> MIDI OUT
The MC68EC000 lacks the M6800-family E, VMA,
and VPA peripheral interface. The adapter synchronizes
each processor request to a continuous local enable clock. It captures
read data at the end of the MC6850 cycle and holds that byte on the
processor bus before returning MIDI_DTACK_n.
3. Bus Interface
| Motherboard signal | Adapter or MC6850 connection | Function |
|---|---|---|
D7..D0 |
MC6850 data pins and U_MIDI_RDATA | Transfers register data on the lower byte lane. |
A1 |
MC6850 RS |
Selects the control/status or transmit/receive pair. |
R/W |
MC6850 R/W |
High reads; low writes. |
IO5_n |
U_MIDI_REQ | Selects I/O slot 5 during a normal bus cycle. |
LDS_n |
U_MIDI_REQ | Restricts the interface to the lower data byte. |
MIDI_DTACK_n |
U_MIDI_ACK_GATE output | Returns the completed byte transfer to the motherboard. |
Cycle Qualification
One SN74F02N gate, U_MIDI_REQ, asserts MIDI_CYCLE only
while slot 5 and the lower byte lane are selected.
MIDI_CYCLE = NOT (IO5_n OR LDS_n)
An upper-byte access leaves MIDI_CYCLE low and reaches
the motherboard timeout. A word access includes the lower lane and
completes, but only D7..D0 contain valid data. Software
shall use byte accesses at odd addresses.
MC6850 Selection
MC6850 CS0 and CS1 connect to +5 V.
/CS2 receives MIDI_ACIA_CS_n. U_MIDI_CS is
one SN74F32N OR gate driven by the complementary SELECT output and
DONE.
MIDI_ACIA_CS_n = (NOT MIDI_SELECT) OR MIDI_DONE
Selection begins after one falling edge of MIDI_CLK_500K
and ends after the next falling edge. The MC6850 sees a complete low
and high enable phase with address, direction, and write data held by
the waiting processor cycle.
Read-Data Hold Register
U_MIDI_RDATA is an SN74HCT574N. Its D inputs and Q outputs connect
bit-for-bit to processor D7..D0. The rising clock input
receives MIDI_E_n, so it captures the MC6850 byte just
after each falling edge of E. U_MIDI_READ_OE, one
SN74F10N gate, enables the outputs only after a selected read reaches
DONE.
MIDI_READ_OE_n = NOT (MIDI_DONE AND R/W AND MIDI_CYCLE)
The MC6850 and U_MIDI_RDATA can drive the bus together briefly after the completion edge. Both drive the byte that the register captured. The ACIA then enters its high-impedance state while the register holds the byte through processor termination. During writes, U_MIDI_RDATA does not drive the bus.
4. Adapter Sequence
U_MIDI_SYNC is an SN74HCT74N. Its first flip-flop samples
MIDI_CYCLE on MIDI_CLK_5; its second stage
produces MIDI_REQ_SYNC. Both asynchronous clears connect
to MIDI_CYCLE, so releasing the processor cycle clears
the request without waiting for a clock edge.
U_MIDI_SEQ is a second SN74HCT74N. Both flip-flops clock on
MIDI_E_n, the inverted 500 kHz enable clock. The first D
input is high and produces SELECT. The second D input receives SELECT
and produces DONE one enable period later. Their clears connect to
MIDI_REQ_SYNC.
U_MIDI_ACK is one half of a third SN74HCT74N. It samples DONE on
MIDI_CLK_5 and produces MIDI_ACK_READY. Its
asynchronous clear connects directly to MIDI_CYCLE. The
extra 5 MHz stage gives U_MIDI_RDATA time to enable before the
motherboard sees an acknowledgement.
| State | MC6850 selected | Read register | MIDI_DTACK_n |
|---|---|---|---|
| Request synchronizing | No | Disabled | High |
| SELECT after first falling E edge | Yes | Disabled | High |
| DONE after second falling E edge | No; transfer has finished | Enabled for a read | High |
| ACK_READY after the following 5 MHz edge | No | Enabled for a read | Low |
| Processor releases the cycle | No | Disabled | High |
U_MIDI_ACK_GATE is one SN74F00N NAND gate. Raw cycle qualification
keeps the completion response inactive outside slot 5 and releases it
promptly when LDS_n rises.
MIDI_DTACK_n = NOT (MIDI_ACK_READY AND MIDI_CYCLE)
5. Register Map
| Address | Read | Write | RS |
|---|---|---|---|
$EA0001 |
Status register | Control register | 0 |
$EA0003 |
Receive data register | Transmit data register | 1 |
Address lines A16..A2 do not enter the local decode. The
two-register pattern repeats every four bytes throughout slot 5. The
addresses above are the canonical copy used by firmware.
| Bit | Name | Meaning when set |
|---|---|---|
| 0 | RDRF | A received byte is ready. |
| 1 | TDRE | The transmit data register accepts another byte. |
| 2 | DCD | Data carrier detect is inactive. |
| 3 | CTS | Clear to send is inactive. |
| 4 | FE | The received byte has a framing error. |
| 5 | OVRN | At least one received byte was lost. |
| 6 | PE | The received byte has a parity error. |
| 7 | IRQ | An enabled interrupt condition is active. |
/CTS and /DCD connect to ground. The
transmitter remains clear to send and the receiver remains enabled.
/RTS is unused and has no board connection.
6. Clock and Reset
U_MIDI_INV channel 1 is one SN74F04N inverter. It takes
MFP_CLK_5 from the first stage of the MFP clock divider
and drives the MIDI-local MIDI_CLK_5 net. U_MIDI_CLK is
an SN74LS390N wired as divide by 5 followed by divide by 2. Its final
divide-by-2 output supplies a symmetrical 500 kHz waveform.
MFP_CLK_5 -- local buffer --> MIDI_CLK_5
MIDI_CLK_5 -- divide by 5 --> MIDI_CLK_DIV5
MIDI_CLK_DIV5 -- divide by 2 --> MIDI_CLK_500K
MIDI_CLK_500K --> MC6850 E, Tx CLK, and Rx CLK
MC6850 divide ratio = 16
MIDI bit rate = 31.25 kbit/s
U_MIDI_CLK pin 4, 1CLKB, receives
MIDI_CLK_5. Pin 7, 1QD, feeds pin 1,
1CLKA. Pin 3, 1QA, produces
MIDI_CLK_500K. Pin 2, 1CLR, is grounded. The
unused second counter has both clock inputs and its clear input
grounded; its outputs remain unconnected.
ACIA Reset
The MC6850 has no reset pin. Its control-register divide field must be
written as 11 after power-up and after every processor
RESET sequence. Firmware writes $03 to
$EA0001 before it writes the operating configuration.
The clock divider runs whenever +5 V and MFP_CLK_5 are
present. Adapter state clears whenever no MIDI bus cycle is active.
The MC6850 remains in an unspecified power-up state until firmware
issues the master-reset write.
7. Programming Rules
The normal operating control byte is $95. It selects the
divide-by-16 clock, 8-N-1 framing, inactive transmitter interrupts,
low /RTS, and enabled receiver interrupts.
| Step | Operation | Purpose |
|---|---|---|
| 1 | Write $03 to $EA0001. |
Master-resets the ACIA. |
| 2 | Read $EA0001. |
Observes initial status with CTS and DCD active low. |
| 3 | Write $95 to $EA0001. |
Starts 31.25 kbit/s 8-N-1 operation with receive interrupts. |
Firmware reads the status register before the data register. RDRF identifies a current received byte; FE, OVRN, and PE describe that receive state. Firmware writes the transmit data register only while TDRE is set. Changing word format or clock division while a byte is in flight can corrupt that byte.
A polling-only configuration uses $15. Transmitter
interrupts stay disabled in both configurations because TDRE is
normally high whenever the transmitter is idle and would otherwise
hold /IRQ low.
8. Interrupts
MC6850 pin 7 is an active-low open-drain output. R_MIDI_IRQ is a 4.7
kohm pull-up from MIDI_IRQ_n to +5 V. The same net
connects to MC68901 GPIP4. The MFP detects the falling edge and
supplies vector $46 during the level-6 acknowledge cycle.
With control byte $95, a full receive register or an
overrun can request service. DCD is held low. The handler reads
status, reads the receive data register when RDRF or an error is
present, and returns after the enabled condition has cleared.
MIDI THRU remains active while the MC6850 interrupt is pending. A slow handler can overrun the ACIA receive register, but it does not stop the electrical copy from MIDI IN to MIDI THRU.
9. MIDI IN
J_MIDI_IN is a 5-pin, 180-degree DIN female connector. Pin 4 reaches U_MIDI_OPTO pin 2, the 6N138 LED anode, through R_MIDI_IN, 220 ohms. DIN pin 5 connects to U_MIDI_OPTO pin 3, the cathode. D_MIDI_IN is a 1N4148 across the LED with its cathode at pin 2 and anode at pin 3.
J_MIDI_IN pin 4 -- 220 ohms --+--> 6N138 pin 2, anode
|
1N4148 reverse clamp
|
J_MIDI_IN pin 5 --------------+--> 6N138 pin 3, cathode
6N138 pin 8 ----------------------> +5 V
6N138 pin 5 ----------------------> ground
6N138 pin 6 -- 2.2 kohm pull-up --> MIDI_RX_OPTO_n
6N138 pin 7 -- 47 kohm -----------> ground
MIDI_RX_OPTO_n --> LS14 --> LS14 --> MIDI_RX_DATA
U_MIDI_OPTO pins 1 and 4 remain open. C_MIDI_OPTO, 100 nF, connects between pins 8 and 5 at the package. R_MIDI_BASE uses the 6N138 datasheet's 47 kohm gain-warning boundary while reducing stored charge.
Two channels of U_MIDI_SCHMITT, an SN74LS14N, square the optocoupler
output and restore its polarity. Current through the optocoupler makes
MIDI_RX_DATA low. The net drives MC6850 Rx Data and one
U_MIDI_DRIVER input. Pins 1, 2, and 3 of J_MIDI_IN have no DC
connection to motherboard ground.
10. MIDI OUT and THRU
U_MIDI_DRIVER is an SN74LS07N. One non-inverting open-collector
channel takes MC6850 Tx Data and sinks the MIDI OUT loop. A second
channel takes MIDI_RX_DATA and sinks the MIDI THRU loop.
Logical zero turns the selected output transistor on, matching MIDI's
current-on zero state.
+5 V -- 220 ohms --> J_MIDI_OUT pin 4
J_MIDI_OUT pin 5 -- 220 ohms --> LS07 output
MC6850 Tx Data ----------------> LS07 input
+5 V -- 220 ohms --> J_MIDI_THRU pin 4
J_MIDI_THRU pin 5 -- 220 ohms --> LS07 output
MIDI_RX_DATA ------------------> LS07 input
The four output resistors are 220 ohms, 5%, 0.25 W. Each output drives one MIDI input. Four unused SN74LS07 inputs connect to ground and their outputs remain open. MIDI OUT idles with Tx Data high. MIDI THRU follows the isolated input even while the ACIA is reset or software is not reading it.
11. Connector Pinout
| DIN pin | MIDI IN | MIDI OUT | MIDI THRU |
|---|---|---|---|
| 1 | Not connected | Not connected | Not connected |
| 2 | No DC connection | MIDI_OUT_SHIELD layout pad |
MIDI_THRU_SHIELD layout pad |
| 3 | Not connected | Not connected | Not connected |
| 4 | 220 ohms to optocoupler anode | 220 ohms to +5 V | 220 ohms to +5 V |
| 5 | Optocoupler cathode | 220 ohms to open-collector driver | 220 ohms to open-collector driver |
| Shell | MIDI_IN_SHELL isolated layout pad |
MIDI_OUT_SHELL layout pad |
MIDI_THRU_SHELL layout pad |
J_MIDI_IN, J_MIDI_OUT, and J_MIDI_THRU are labeled 5-pin, 180-degree DIN female receptacles. Connector drawings can show pin numbers from the mating face or solder side. The schematic symbol and footprint shall use the manufacturer's numbering.
The recommended part is the CUI Devices SDS-50J, a
through-hole 5-pin 180-degree DIN receptacle, used three times. Any
5-pin 180-degree DIN receptacle with the same footprint is acceptable.
12. Package and Pin Maps
MC6850P
| Pin | Signal | Connection |
|---|---|---|
| 1 | VSS | Ground |
| 2 | Rx Data | MIDI_RX_DATA |
| 3 | Rx CLK | MIDI_CLK_500K |
| 4 | Tx CLK | MIDI_CLK_500K |
| 5 | /RTS |
Not connected |
| 6 | Tx Data | U_MIDI_DRIVER input |
| 7 | /IRQ |
MIDI_IRQ_n |
| 8 | CS0 | +5 V |
| 9 | /CS2 |
MIDI_ACIA_CS_n |
| 10 | CS1 | +5 V |
| 11 | RS | CPU A1 |
| 12 | VCC | +5 V |
| 13 | R/W |
CPU R/W |
| 14 | E | MIDI_CLK_500K |
| 15 | D7 | CPU D7 |
| 16 | D6 | CPU D6 |
| 17 | D5 | CPU D5 |
| 18 | D4 | CPU D4 |
| 19 | D3 | CPU D3 |
| 20 | D2 | CPU D2 |
| 21 | D1 | CPU D1 |
| 22 | D0 | CPU D0 |
| 23 | /DCD |
Ground |
| 24 | /CTS |
Ground |
6N138
| Pin | Signal | Connection |
|---|---|---|
| 1 | NC | Not connected |
| 2 | Anode | R_MIDI_IN from DIN pin 4 |
| 3 | Cathode | DIN pin 5 |
| 4 | NC | Not connected |
| 5 | GND | Motherboard ground |
| 6 | VO | MIDI_RX_OPTO_n |
| 7 | VB | 47 kohms to ground |
| 8 | VCC | +5 V |
Adapter Packages
| Reference | Part | Assignment |
|---|---|---|
U_MIDI_SYNC |
SN74HCT74N | Two-stage 5 MHz request synchronizer. |
U_MIDI_SEQ |
SN74HCT74N | SELECT and DONE, clocked by MIDI_E_n. |
U_MIDI_ACK |
SN74HCT74N | First half generates ACK_READY; unused half is tied inactive. |
U_MIDI_RDATA |
SN74HCT574N | Eight-bit ACIA read-data hold register. |
U_MIDI_REQ |
SN74F02N | Cycle qualification. |
U_MIDI_INV |
SN74F04N | MFP clock buffer and E inversion. |
U_MIDI_CS |
SN74F32N | MC6850 select release. |
U_MIDI_READ_OE |
SN74F10N | Read-register output enable. |
U_MIDI_ACK_GATE |
SN74F00N | Cycle-gated completion. |
Unused FAST gate inputs connect to ground. The unused U_MIDI_ACK half has D and CLK grounded and both asynchronous inputs tied high.
Sequential Logic Pins
| Reference | Pins | Connection |
|---|---|---|
U_MIDI_SYNC |
1 /1CLR, 13 /2CLR |
MIDI_CYCLE |
U_MIDI_SYNC |
2 1D |
+5 V |
U_MIDI_SYNC |
3 1CLK, 11 2CLK |
MIDI_CLK_5 |
U_MIDI_SYNC |
4 /1PRE, 10 /2PRE |
+5 V |
U_MIDI_SYNC |
5 1Q |
Pin 12, 2D |
U_MIDI_SYNC |
9 2Q |
MIDI_REQ_SYNC |
U_MIDI_SYNC |
6 /1Q, 8 /2Q |
Not connected |
U_MIDI_SEQ |
1 /1CLR, 13 /2CLR |
MIDI_REQ_SYNC |
U_MIDI_SEQ |
2 1D |
+5 V |
U_MIDI_SEQ |
3 1CLK, 11 2CLK |
MIDI_E_n |
U_MIDI_SEQ |
4 /1PRE, 10 /2PRE |
+5 V |
U_MIDI_SEQ |
5 1Q |
MIDI_SELECT and pin 12, 2D |
U_MIDI_SEQ |
6 /1Q |
MIDI_SELECT_n |
U_MIDI_SEQ |
9 2Q |
MIDI_DONE |
U_MIDI_SEQ |
8 /2Q |
Not connected |
U_MIDI_ACK |
1 /1CLR |
MIDI_CYCLE |
U_MIDI_ACK |
2 1D |
MIDI_DONE |
U_MIDI_ACK |
3 1CLK |
MIDI_CLK_5 |
U_MIDI_ACK |
4 /1PRE |
+5 V |
U_MIDI_ACK |
5 1Q |
MIDI_ACK_READY |
U_MIDI_ACK |
6 /1Q, 8 /2Q, 9 2Q |
Not connected |
U_MIDI_ACK |
10 /2PRE, 13 /2CLR |
+5 V |
U_MIDI_ACK |
11 2CLK, 12 2D |
Ground |
| All three packages | 7, 14 | Ground, +5 V |
| Pin | Signal | Connection |
|---|---|---|
| 1 | /OE |
MIDI_READ_OE_n |
| 2, 3, 4, 5, 6, 7, 8, 9 | Q0..Q7 | CPU D0..D7, in order |
| 10 | GND | Ground |
| 11 | CLK | MIDI_E_n |
| 12, 13, 14, 15, 16, 17, 18, 19 | D7..D0 | CPU D7..D0, in order |
| 20 | VCC | +5 V |
Clock and Gate Pins
| Pin | Signal | Connection |
|---|---|---|
| 1 | 1CLKA |
Pin 7, 1QD |
| 2 | 1CLR |
Ground |
| 3 | 1QA |
MIDI_CLK_500K |
| 4 | 1CLKB |
MIDI_CLK_5 |
| 5, 6 | 1QB, 1QC |
Not connected |
| 7 | 1QD |
MIDI_CLK_DIV5 and pin 1 |
| 8 | GND | Ground |
| 9, 10, 11, 13 |
2QD, 2QC, 2QB,
2QA
|
Not connected |
| 12, 14, 15 | 2CLKB, 2CLR, 2CLKA |
Ground |
| 16 | VCC | +5 V |
| Reference | Input pins | Output pin and net |
|---|---|---|
U_MIDI_REQ, SN74F02N gate 1 |
2: IO5_n; 3: LDS_n |
1: MIDI_CYCLE |
U_MIDI_INV, SN74F04N gate 1 |
1: MFP_CLK_5 |
2: MIDI_CLK_5 |
U_MIDI_INV, SN74F04N gate 2 |
3: MIDI_CLK_500K |
4: MIDI_E_n |
U_MIDI_CS, SN74F32N gate 1 |
1: MIDI_SELECT_n; 2: MIDI_DONE |
3: MIDI_ACIA_CS_n |
U_MIDI_READ_OE, SN74F10N gate 2 |
3: MIDI_DONE; 4: CPU R/W; 5:
MIDI_CYCLE
|
6: MIDI_READ_OE_n |
U_MIDI_ACK_GATE, SN74F00N gate 1 |
1: MIDI_ACK_READY; 2: MIDI_CYCLE
|
3: MIDI_DTACK_n |
U_MIDI_SCHMITT, SN74LS14N gate 1 |
1: MIDI_RX_OPTO_n |
2: MIDI_RX_SCHMITT |
U_MIDI_SCHMITT, SN74LS14N gate 2 |
3: MIDI_RX_SCHMITT |
4: MIDI_RX_DATA |
U_MIDI_DRIVER, SN74LS07N gate 1 |
1: MC6850 Tx Data | 2: R_MIDI_OUT_LOW to J_MIDI_OUT pin 5 |
U_MIDI_DRIVER, SN74LS07N gate 2 |
3: MIDI_RX_DATA |
4: R_MIDI_THRU_LOW to J_MIDI_THRU pin 5 |
Every 14-pin gate package uses pin 14 for +5 V and pin 7 for ground. Unused input pins are grounded: U_MIDI_REQ pins 5, 6, 8, 9, 11, and 12; U_MIDI_INV pins 5, 9, 11, and 13; U_MIDI_CS pins 4, 5, 9, 10, 12, and 13; U_MIDI_READ_OE pins 1, 2, 9, 10, 11, and 13; U_MIDI_ACK_GATE pins 4, 5, 9, 10, 12, and 13; U_MIDI_SCHMITT pins 5, 9, 11, and 13; and U_MIDI_DRIVER pins 5, 9, 11, and 13. Their unused outputs remain unconnected.
13. Timing and Electrical Checks
| Parameter | Requirement | Design value | Result |
|---|---|---|---|
| E cycle time | 1 to 10 us | 2 us nominal | Within range |
| E low pulse | 430 ns to 9.5 us | 1 us nominal | 570 ns nominal margin |
| E high pulse | 450 ns to 9.5 us | 1 us nominal | 550 ns nominal margin |
| Serial clock in divide-by-16 mode | 800 kHz maximum | 500 kHz nominal | 300 kHz below maximum |
| Serial-clock high and low pulses | 600 ns minimum each | 1 us nominal each | 400 ns nominal margin |
The installed master oscillator has a tolerance of +/-100 ppm before aging. Division preserves that relative tolerance, so the nominal 31.25 kbit/s stream remains inside MIDI's +/-1% rate limit.
Bus Response
Request synchronization takes at most two 5 MHz periods plus phase alignment. Waiting for the first 500 kHz falling edge takes less than one enable period, the selected ACIA cycle takes one more period, and ACK_READY takes no more than one 5 MHz period after DONE. The conservative logic-only bound is 4.6 us before gate and routing delay, below the motherboard's 51.1 us normal-cycle timeout.
two 5 MHz synchronizer periods 0.4 us
wait to first 500 kHz falling edge 2.0 us
one selected MC6850 enable period 2.0 us
ACK_READY registration 0.2 us
------------------------------------------------
conservative phase bound 4.6 us
On release, U_MIDI_ACK_GATE adds at most 6 ns before
MIDI_DTACK_n rises. The completion tree adds 5.3 ns in
its group SN74F21, 5.3 ns in the final SN74F21, and 6.6 ns in the
timeout-mask SN74F32. The 23.2 ns component total leaves 86.8 ns for
routed delay and loading under the MC68EC000's 110 ns limit.
U_MIDI_ACK_GATE release 6.0 ns maximum
group SN74F21 5.3 ns maximum
final SN74F21 5.3 ns maximum
timeout-mask SN74F32 6.6 ns maximum
------------------------------------------------
component total 23.2 ns
MC68EC000 limit 110.0 ns
board allowance 86.8 ns
MC6850 read data is valid no later than 320 ns after E rises on the 1.0 MHz grade. The 1 us high phase leaves about 680 ns before E falls, so the data is settled well before the capture edge.
The capture edge is the problem. U_MIDI_INV inverts
MIDI_CLK_500K into MIDI_E_n in up to 6.0 ns
(SN74F04 tPLH), so U_MIDI_RDATA clocks that long after E
falls. The MC6850 guarantees read data for only 10 ns after E falls,
and the SN74HCT574 requires 5 ns of hold after its rising clock edge.
The component-only hold margin is therefore negative:
MC6850 data hold after E falls 10.0 ns
U_MIDI_INV SN74F04, tPLH -6.0 ns
SN74HCT574 data hold requirement -5.0 ns
------------------------------------------------
component hold margin -1.0 ns
Open item. This capture is not proven, and board
delay only makes it worse. Confirm the MC6850P tDDR and
tDHR figures against the 1.0 MHz column of the device
data sheet, then close the margin before fabrication. The
straightforward fixes are to clock U_MIDI_RDATA directly from
MIDI_CLK_500K's falling edge instead of from the inverted
copy, or to capture one MIDI_CLK_5 period earlier while
E is still high. Section 13 numbers otherwise use the 1.0
MHz column throughout, which is what the E-cycle and serial-clock rows
above already assume.
MIDI Current Loops
A complete 5 V MIDI loop contains three 220 ohm resistors. At nominal values and the 6N138 typical 1.4 V LED drop, the current is about 5.45 mA. At 4.75 V, 5% high resistors, and the 1.7 V maximum LED drop, it remains about 4.40 mA. The 6N138 guarantees TTL-load operation at 1.6 mA.
I nominal = (5.00 V - 1.40 V) / (3 * 220 ohms) = 5.45 mA
I low = (4.75 V - 1.70 V) / (3 * 231 ohms) = 4.40 mA
Shorting an output signal pin to ground puts at most 5.25 V across one 209 ohm minimum resistor. The resulting 25.1 mA and 132 mW remain below the resistor's 0.25 W rating. The SN74LS07 output can sink the normal loop current and is rated for 40 mA low-state current.
| Net | Added load | Result |
|---|---|---|
MFP_CLK_5 |
One SN74F04 input | The MFP divider also drives its existing second stage. |
MIDI_CLK_5 |
Four clock inputs | U_MIDI_CLK, both U_MIDI_SYNC halves, and U_MIDI_ACK. |
D7..D0 |
One MC6850 pin and one SN74HCT574 input and output per line | Included in the post-layout bus-load check. |
MIDI_IRQ_n |
4.7 kohm pull-up and one MFP input | About 1.12 mA at 5.25 V when asserted. |
MIDI_RX_OPTO_n |
2.2 kohm pull-up and one LS14 input | The 6N138's guaranteed low-state drive covers both loads. |
14. Parts Added
| Reference | Part | Function |
|---|---|---|
U_MIDI_ACIA |
MC6850P | Asynchronous serial adapter. |
U_MIDI_OPTO |
6N138 | MIDI IN optocoupler. |
U_MIDI_DRIVER |
SN74LS07N | MIDI OUT and THRU drivers. |
U_MIDI_SCHMITT |
SN74LS14N | MIDI IN edge cleanup. |
U_MIDI_CLK |
SN74LS390N | 5 MHz to 500 kHz divider. |
U_MIDI_SYNC, U_MIDI_SEQ,
U_MIDI_ACK
|
3 x SN74HCT74N | Synchronization, sequence state, and acknowledgement. |
U_MIDI_RDATA |
SN74HCT574N | Read-data hold register. |
U_MIDI_REQ |
SN74F02N | Cycle qualification. |
U_MIDI_INV |
SN74F04N | Clock buffering and inversion. |
U_MIDI_CS |
SN74F32N | ACIA selection. |
U_MIDI_READ_OE |
SN74F10N | Read-register enable. |
U_MIDI_ACK_GATE |
SN74F00N | Completion qualification. |
J_MIDI_IN, J_MIDI_OUT,
J_MIDI_THRU
|
3 x 5-pin DIN female, 180 degree; recommended part CUI Devices
SDS-50J
|
MIDI cable connectors. |
D_MIDI_IN |
1N4148 | Optocoupler reverse clamp. |
R_MIDI_IN |
220 ohms, 5%, 0.25 W | MIDI IN current limiting. |
R_MIDI_OPTO |
2.2 kohm, 5% | 6N138 output pull-up. |
R_MIDI_BASE |
47 kohm, 5% | 6N138 base discharge. |
R_MIDI_IRQ |
4.7 kohm, 5% | MC6850 interrupt pull-up. |
R_MIDI_OUT_HIGH, R_MIDI_OUT_LOW |
2 x 220 ohms, 5%, 0.25 W | MIDI OUT current limiting. |
R_MIDI_THRU_HIGH, R_MIDI_THRU_LOW
|
2 x 220 ohms, 5%, 0.25 W | MIDI THRU current limiting. |
Motorola documented the MC6850 revision used here in 1985. Texas Instruments documented the SN74LS390 in 1976, the SN74HCT74 in 1982, the SN74HCT574 in 1984, the FAST gates in 1987, and the SN74LS07 in 1990. Hewlett-Packard's 1978 optoelectronics catalog includes the 6N138. Each IC has a 100 nF ceramic bypass capacitor at its supply pins. U_MIDI_ACIA, U_MIDI_CLK, and U_MIDI_OPTO also have a 1 uF local capacitor beside the package.
15. Board Layout
- Put the three DIN connectors at the board edge and verify every footprint pin number against the mating-face drawing. Mark IN, OUT, and THRU on the silkscreen.
-
Decide the chassis and shield scheme during board layout.
MIDI_OUT_SHIELD,MIDI_THRU_SHIELD, and the three connector-shell pads may remain open or receive the board's chosen chassis or RF connection. Do not give J_MIDI_IN pin 2 or its shell a direct DC path to logic ground. - Place U_MIDI_OPTO, D_MIDI_IN, and R_MIDI_IN beside J_MIDI_IN. Keep every isolated input-side trace away from motherboard-ground copper across the optocoupler isolation boundary.
-
Place each OUT and THRU 220 ohm resistor beside its connector or
driver. Keep the two current-loop traces paired and away from
MIDI_RX_OPTO_n. -
Route
MFP_CLK_5only to U_MIDI_INV. KeepMIDI_CLK_5,MIDI_CLK_500K, andMIDI_E_nshort and free of long test-point stubs. -
Measure the added
MFP_CLK_5load and the four-loadMIDI_CLK_5branch. Verify clean threshold crossings at U_MIDI_CLK, U_MIDI_SYNC, and U_MIDI_ACK. -
Measure
MIDI_CLK_500Kat MC6850 pins 3, 4, and 14. Each high and low pulse must exceed 600 ns, and the frequency must remain within the MIDI +/-1% limit. -
Measure the 6N138 and two LS14 stages with a 31.25 kbit/s test
stream. Each final
MIDI_RX_DATAedge must complete in less than 2 us, and THRU must preserve valid bit widths. - Include U_MIDI_ACIA and U_MIDI_RDATA in the processor data-bus capacitance total. Check read-bus overlap at the second E falling edge and confirm that both devices drive the same captured value.
- Measure the E-falling-to-U_MIDI_RDATA clock path against the MC6850 data hold time. The component-only margin is negative, so resolve the open item in section 13 before committing the layout.
-
Measure the routed
MIDI_DTACK_nrelease path and keep its board contribution below 86.8 ns. - Place every 100 nF capacitor at its IC supply pins. Put the 1 uF capacitors beside U_MIDI_ACIA, U_MIDI_CLK, and U_MIDI_OPTO.
16. Internal Signal Reference
| Signal | Source | Destination |
|---|---|---|
MIDI_CYCLE |
U_MIDI_REQ | Synchronizer, ACK register, read-enable gate, and completion gate. |
MIDI_CLK_5 |
U_MIDI_INV from MFP_CLK_5 |
Clock divider, synchronizer, and ACK register. |
MIDI_CLK_DIV5 |
U_MIDI_CLK | U_MIDI_CLK final divide-by-2 stage. |
MIDI_CLK_500K |
U_MIDI_CLK | MC6850 E, Tx CLK, and Rx CLK. |
MIDI_E_n |
U_MIDI_INV | U_MIDI_SEQ and U_MIDI_RDATA clocks. |
MIDI_REQ_SYNC |
U_MIDI_SYNC | U_MIDI_SEQ asynchronous clears. |
MIDI_SELECT |
U_MIDI_SEQ first half | U_MIDI_SEQ second half and U_MIDI_CS. |
MIDI_SELECT_n |
U_MIDI_SEQ first-half complementary output | U_MIDI_CS. |
MIDI_DONE |
U_MIDI_SEQ second half | U_MIDI_CS, U_MIDI_ACK, and U_MIDI_READ_OE. |
MIDI_ACK_READY |
U_MIDI_ACK | U_MIDI_ACK_GATE. |
MIDI_ACIA_CS_n |
U_MIDI_CS | MC6850 /CS2. |
MIDI_READ_OE_n |
U_MIDI_READ_OE | U_MIDI_RDATA /OE. |
MIDI_DTACK_n |
U_MIDI_ACK_GATE | Motherboard completion tree. |
MIDI_IRQ_n |
MC6850 pin 7 | MC68901 GPIP4 and R_MIDI_IRQ. |
MIDI_RX_OPTO_n |
6N138 pin 6 | First U_MIDI_SCHMITT channel. |
MIDI_RX_SCHMITT |
U_MIDI_SCHMITT first channel | U_MIDI_SCHMITT second channel. |
MIDI_RX_DATA |
Second U_MIDI_SCHMITT channel | MC6850 Rx Data and MIDI THRU driver. |
17. Sources
- Motorola, MC6850 Asynchronous Communications Interface Adapter, 1985. Device operation, pinout, registers, electrical limits, and bus and serial timing.
- Motorola, M68000 User's Manual, sections 3.7, 5.1, 10.13, and 10.14.
- MIDI Manufacturers Association and AMEI MIDI Committee, MIDI 1.0 Electrical Specification Update, 2014. The 5 V circuit retains the original 220 ohm transmitter values, 5 mA loop, 8-N-1 format, DIN pinout, receiver isolation, and hardware THRU behavior.
- Hewlett-Packard, Optoelectronics Designer's Catalog, 1978. Historical 6N138 data and switching guidance.
- Broadcom, 6N138/6N139 Low Input Current, High Gain Optocouplers. Current electrical, package, bypass, and base-resistor data for the period 6N138 family.
- Texas Instruments, SN74LS390 Dual 4-Bit Decade Counter, October 1976, revised March 1988.
- Texas Instruments, SN74LS07, SN74LS14, SN74HCT74, and SN74HCT574 data sheets.
- Texas Instruments, SN74F00, SN74F02, SN74F04, SN74F10, and SN74F32 data sheets.