I dropped the pullup resistor to 150, then 83 ohms and it has made no difference. I cannot change the 660 ohms bit as that is coming from the midi out of my synth. Here is what it says in the midi spec... 'The MIDI circuit is current loop, 5 mA. Logic 0 is current ON. One output drives one (and only one) input. To avoid grounding loops and subsequent data errors, the input is opto-isolated. It requires less than 5 mA to turn on. The Sharp PC-900 and HP 6N138 optoisolators are satisfactory devices. Rise and fall time for the optoisolator should be less than 2 microseconds.' Maybe I should give up and try and get hold of a 138? ( I know somebody has done it with a 139 as I found a reference to it on the web - only no schematic : damn!) Thanks for the help.. Catchy -----Original Message----- From: Joe Little To: PICLIST@MITVMA.MIT.EDU Date: 18 May 1998 14:25 Subject: [Re:] Midi in to PIC problems The 6N138 and 6N139 are very similar. They even share the same page in the databook. I noticed only a small difference between the two. The '139 can withstand a little more voltage on it's output, and it is a little more sensative on it's input.... but it's a little slower passing the signal. I noticed that they run a little faster when driven a little harder. The input can stand 20 mA continuous drive, and Pin 6 may sink 60mA (Absolute maximums). For 5V systems, the series resistor on the input may be reduced to 250 ohms. Notice that there is 660 ohms from three resistors there now. The pullup resistor on pin 6 may be reduced to 83 ohms. You could try reducing the resistor values toward the minimums to see if it fixes the problem. joe jlittle@mindspring.com ---------------------------- Hiya, Can anybody help me? (no smart comments please :-) I am trying to get MIDI data into my 16C77. It kind of works, but seems to get some wrong values through (I have examined the same stream on the PC and it is being transmitted correctly) PIC is running at 10 Mhz (oscillator using 22pf capacitors). SPBRG is set to 4 (which should give me the 31250 bps right?) The circuit I am using for input is basically a standard circuit (see the input section of http://www.borg.com/~jglatt/tech/midi.gif ), but I am using a 6N139 opto isolator (because I cannot easily get hold of a 6n138). I would imagine that there is a slight difference that I need to get over but 1) I have no specs for the 138 to compare with 2) My analogue electronics is pants has anybody got any ideas I could try (like maybe a new hobby :-) Regards Catchy