Electronic – What decides that an IC will be able to sink or source current

current-sinkcurrent-sourceintegrated-circuitmicrocontrolleroutput

Correct me if I am wrong but so far, I've learnt that some ICs can source current while some can only sink (open-collector) while others can do both. And it is decided by looking at the datasheet, Ioh and Iol readings, which should be in mA values to glow an LED. But I sense I'm wrong since an LED should not be the only factor to decide sink/source concept.
To add, Ioh and Iol can be of different values (like one in uA while other in mA), so it is not related to heat generated in the IC since heat generated is directly related to current in the IC.
So my question is, what actually decides whether an IC will be able to sink or source while Voltage outputs for low and high states are similar for all of them! So what exactly decides whether the current will be uA even when output is high or in mA even when output is low?

[edit]We say that the IC is an open-collector, so even when the output is HIGH voltage output, it wont be able to source since Ioh will be in uA (like in case of 7489 RAM). So, what exactly decided this uA current while current should be related to external load resistance attached to output which is in our control. What exactly limits this current to uA? It should not be heat since in case of LOW state, current is in mA, which should actually burn the IC if we go by logic of heat for uA current in high state.

Best Answer

I thought I'd start out with an adaptation of the four-quadrant chart often seen for other reasons in electronics. In the following chart, the \$x\$-axis is for current (into or out of the pin) and the \$y\$-axis is for voltage at the pin (relative to the voltage at the other end of the load that's attached to it.)

enter image description here

There are four possible quadrants. Keep in mind here that I'm discussing digital systems with \$V_\text{CC}\$ (highest possible voltage) and ground (lowest possible voltage.)

  1. In quadrant 1, the pin voltage is being driven above the voltage at the other end of the load and it is sourcing current into the load.
  2. Quadrant 2 is never a good thing for an output pin (and isn't used.)
  3. In quadrant 3, the pin voltage is being driven below the voltage at the other end of the load and it is sinking current from the load.
  4. Quadrant 4 is never a good thing for an output pin (and isn't used.)

Some outputs are only capable of actively operating in quadrant 1 (rarely found, but certainly possible.) Some outputs are only capable of actively operating in quadrant 3 (frequently found and often called "open-drain" or "open-collector" outputs.) Some outputs are capable of actively operating in both quadrants 1 and 3 (quite common.)

For outputs that are capable of actively operating in both quadrants 1 and 3, it's sometimes possible to configure them so they actively operate in only one quadrant, or the other.

I've used the term "actively" to mean that they use an active transistor circuit of some kind. There is another term, "passively," that can be used for simple parts such as a resistor. So, for example, you can take an output that is open-drain (quadrant 3 operation only) and add a sourcing resistor to that pin, tying the other end of the resistor to \$V_\text{CC}\$, in order to provide an "active-LO" and "passive-HI" output. Now, it can both sink and source current! But it cannot source current nearly as well as an output pin that operates actively in both quadrants 1 and 3, because a sourcing resistor is not as good as a sourcing transistor circuit when sourcing current.

So as you can see there are a variety of mechanisms for an output pin. And you can modify output pins that are limited to one quadrant or another, adding a resistor (between the output pin and ground or \$V_\text{CC}\$) to provide a small measure of added behavior in the opposing power sourcing quadrant.