This is not a good idea. A current loop interface implies a current source, which a PIC pin isn't! A current source will drive the same current (in this case 20ma) no matter what the load resistance (within a certain range). A voltage source, like a PIC pin will drive a current inversely proportional to the load (ie: loop) resistance. -- Bob Ammerman RAm Systems=20 -----Original Message----- From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] On Behalf Of Jacopo Monegato Sent: Tuesday, September 03, 2013 12:26 PM To: piclist@mit.edu Subject: [PIC] 16f628 and MIDI out Hello there, I am designing a simple MIDI controller with a 16f628. For those who don't know MIDI communication is done through a 20 mA current loop.=20 The MIDI Standard Document states that you should put a buffer or an inverter after the micro's TX pin, depending by the capability of the micro to run with non-inverted/inverted output, so that the inverter could be a single NPN in case of inverted output. However, the PIC USART module doesn'= t have the inverted output mode so it needs a buffer to operate properly, according to the standard.=20 I assume that a buffer/inverter was needed because at the time microcontroller's IOs weren't able to supply/sink the 20mA needed by the current loop. In the datasheet of the 628 it's stated that each I/O pin can handle 25mA, is this true with alternated functions too? If so, could there be any problem if i just connected the TX pin to the socket? on the transmitter there is +5V supply and the TX pin. on the Receiver side it is an optocoupler with a resistor in series of one of the inputs. one of the input of the opto is connected to the +5V and the other to the TX pin Jacopo =20 -- http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/chang= e your membership options at http://mailman.mit.edu/mailman/listinfo/piclist --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .