MIDI decoding using 6402
inman at interpath.com
inman at interpath.com
Sun Aug 1 20:32:17 CEST 1999
I am using a 6N139 to capture a MIDI message and a 6402
to decode it and must be missing something obvious.
I am showing data on all but pin 12 (RBR1 of the 6402).
At rest, the display shows pin 12 and pin 11 Low (RBR1
and RBR2), all other pins High. During play, pin 11
(RBR2) will go High, but at no time (even during sysex
send, channel 2 play, high notes and low notes, pitch
bend, etc...) will pin 12 go High. Am I misunderstanding
MIDI code? Typically, bit 8 should be HIGH only during
the status byte. But it looks as if bit 8 of the MIDI
character is appearing on pin 11 (RBR2) of the 6402
because when I play a note, pin 11 blinks high for a moment.
Is the 6402 programmed for the wrong type of format?
The 6N139 is wired as such:
1 NC 6N139 8 +5
2 200ohm to midi pin 4 7
3 to midi pin 5 6 to 3K3 resistor to +5
and to Pin 20 of 6402
4 NC 5 to grnd
The 6402 is wired as such:
1 to +5V 6402 40 NC
2 NC 39 NC
3 to grnd 38 to +5 High
4 to grnd Low 37 to +5 High
5 (RBR8) to LED 36 to grnd Low
6 (RBR7)to LED 35 to +5 High
7 (RBR6) to LED 34 to +5 High
8 (RBR5) to LED 33 NC
9 (RBR4) to LED 32 NC
10 (RBR3) to LED 31 NC
11 (RBR2) to LED 30 NC
12 (RBR1) to LED 29 NC
13 28 NC
14 27 NC
15 26 NC
16 25 NC
17 to clk 500KHZ 24 NC
18 23 NC
19 22 NC
20 from pin 6 6N139 21 to pulse
(must be pulsed once after startup)
Midi should be one start, one stop bit, no parity. True?
According to the 6402 datasheet, connecting 37 and 38 to High
will program the chip to receive an 8 bit character. 34 loads
the program word and can be set to High. 36 sets the stop bit.
With 36 Low, the chip looks for one stop bit. 39 and 35
control the parity check as follows with 35 for On/Off and 39 for
Odd/Even:
35 parity 39 type
H NO H doesn't matter
H NO L doesn't matter
L YES H EVEN
L YES L ODD
I have tried the following:
- rewiring pins 35-39 every which way for different words
- replacing the 6402
- different LED on pin 12, different wire for pin 12
- moving the 6402 on the breadboard (bad connection?)
I have also checked pin 12 during MIDI send using a DVM.
It has no voltage swing at all.
I am getting the MIDI signal, minus one bit -- I think.
The 6402 datasheet says that if a character is less than
8 bits, the justification is toward pin 12 (right justified).
If anyone has used the 6402 before, help would be
greatly appreciated.
Elliot
More information about the Synth-diy
mailing list