Drive optocoupler from GPIO pin

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 18, 2016 by lpcware
Content originally posted in LPCWare by extest on Sun May 08 12:11:17 MST 2016

I'm trying to drive optocouplers from GPIO pins.  The 6N137 recommended forward current is about 10mA (min 5mA, max 15mA).  The datasheet for the LPC11U37 states that the standard GPIO pins can source/sink 4mA.  It seems like I would need a transistor in between the GPIO pin and the optocoupler since the LPC11U37 cannot provide enough current.

However, I'm confused, because in some NXP Application Note example circuits, I see them driving an optocoupler directly from a GPIO pin with a series 390 ohm resistor.  This works out to drawing about 8.5mA from the LPC micro.  (3.3V/390 = 8.5mA).  Check out page 4 of AN11153: http://www.mouser.com/pdfdocs/AN11153.pdf.

Am I missing something, or is the circuit in AN11153 drawing 8.5mA from the micro GPIO pins?