2
\$\begingroup\$

I'm looking at using a GPIO expander to control some LEDs. I plan to sink the LED current through the GPIO expander (so configure port to output and set to 0 to switch LED on). I'm looking at using this part: http://www.nxp.com/documents/data_sheet/PCA9555.pdf and trying to work out how much current I can sink per pin

Table 13 says absolute max output current is +-50mA which I take to mean 50 mA is absolute max sink current per pin.

Note 2 on page 19 says we can't go over 25 mA per pin, 100 mA per pin bank and 200 mA device total.

Table 14 lists low level output current (I_OL) this is somewhat more confusing. It talks about a low level output voltage (V_OL) but surely if set an output to 0 the pin will go to 0V? (Unless I do something like connect the pin to the middle of a potential divider to try and hold the voltage above that). It then gives currents at two different V_OL values (0.5v and 0.7v) with somewhat non-specific typical currents (8 to 20 and 10 to 24 mA respectively).

Can anyone explain the datasheet to determine possible sink currents?

\$\endgroup\$
  • \$\begingroup\$ 25mA sounds like a good limit to me. The more you sink, the more the output lifts above ground. \$\endgroup\$ – Ignacio Vazquez-Abrams Jul 26 '16 at 22:41
  • \$\begingroup\$ Can't write an answer right now due to a shortage of time. But here is a similar question (except that one about current sourcing by an MSP430). \$\endgroup\$ – Nick Alexeev Jul 26 '16 at 22:42
4
\$\begingroup\$

Let's look at the datasheet and see what it actually means.

Limiting values

Exceeding these will destroy the part. That's how you should think about them. What it actually means is that keeping within the range will not destroy the part, but exceeding them may destroy it. What they don't guarantee is that keeping to the limiting values makes the device operate as intended. You will see that it lists the VDD supply voltage as between -0.5 and +6.0 volts. That doesn't mean it will work with -0.5 volts.

This section merely states that you will not destroy the part if you sink or source less than 50 mA from one I/O pin.

Another important figure here is ISS, ground supply current, which can not exceed 200 mA. The sum of every LED you sink will accumulate to that.

Static characteristics

This is what you should look at in an operational circuit.

The important figure is IOL, LOW-level output current. This is how much current you can sink while still maintaining a certain minimum output voltage.

enter image description here

Notice that they list two values for VOL: 0.5 V and 0.7 V. What it means is that they guarantee by design and testing that if you sink 8 mA in to one pin, it will not rise more than 0.5 V above ground. If you're lucky, some chips can maintain that limit up to 20 mA, which is what the Typ column shows. You can not bet on that, however.

Correspondingly, they also guarantee that it will not rise more than 0.7 V above ground if you keep within 10 mA.

Now, there's an additional footnote. That is not good documentation design, they should have added it to the main table because it's important. The footnote states:

Each I/O must be externally limited to a maximum of 25 mA and each octal (IO00 to IO07 and IO10 to IO17) must be limited to a maximum current of 100 mA for a device total of 200 mA.

This is clear: If you want the device to operate properly, you must follow this.

0 V?

This is a response to your comment:

but surely if set an output to 0 the pin will go to 0V?

Only if you don't draw any current (at best). As soon as you start sinking current, the internal equivalent resistance will force the pin voltage to rise.

a MOSFETs drain to source resistance is on the order of 10-100 mOhm

Sure, for a specifically designed power transistor. That's however not what's integrated on these ICs.

\$\endgroup\$
  • 1
    \$\begingroup\$ > Sure, for a specifically designed power transistor. That's however not what's integrated on these ICs. Aha, I think this is where my misunderstanding lies. Just read this question: electronics.stackexchange.com/questions/144607/… which states that for small MOSFETs we can have a resistance of the order 1-10 ohms, everything now makes sense :) \$\endgroup\$ – Greg Chadwick Jul 26 '16 at 23:16
2
\$\begingroup\$

Regarding your V_OL and I_OL question, it is important to remember that an IC does not have physical (zero ohm) switches between the output pins and Vcc or GND - it has MOSFETs, and they have a finite resistance when switched on, so the actual output voltage on a pin will differ from Vcc or GND, depending on that resistance, and the current sunk or sourced by the I/O pin.

\$\endgroup\$
  • \$\begingroup\$ Sure but as I understand it a MOSFETs drain to source resistance is on the order of 10-100 mOhm. So take the datasheet's example of V_OL = 0.5 with 8 mA output current (current sunk into output) would give a resistance of 6.25 ohm which seems rather high. \$\endgroup\$ – Greg Chadwick Jul 26 '16 at 23:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.