Questions about current flow and output pins

Hello, I am at the very beginning of my electronics course, so I think my questions are very basilar.

Consider the two circuits in the image (output pin may be an analog or a digital output):

  • Circuit on the left.
    If voltage of output pin is greater than Vdiode (or digital high), the diode is forwarded and a current flows from the pin to the ground. So the pin (I mean the IC behind the pin) is an active generator. Power consumption is (Vpin*Ic).
  • Circuit on the right.
    If Vpin is smaller than Vcc-Vdiode (or digital low), the diode is forwarded and a current flows from Vcc to the pin. So the pin is acting like a passive generator with a power consumption of VpinIc (if Vpin > 0). The total power consumption is VLIc + Vpin*Ic.


  • Concerning the second circuit, my considerations are correct?
  • Thinking of the Arduino family, a board can be damaged if a current flows inside an output pin rather than outside?
  • Is it the same with a generic IC (ie a shift register)?
  • How can I estimate the total power consumption if I have many pins?

Thank you very much, and sorry for my poor english.


The circuit on the left is called current sourcing, that on the right is called current sinking, both are fine.

The arduino is unusual in that it can source as much current as it can sink. With other chips you might see that the sinking configuration has the higher current rating.

Both circuits are fine. In fact, if the diode were an LED you could drive it either way.

The output pins have a complimentary arrangement of transistors that allows them to either be a current source (left) or sink (right) up to 40mA in both cases.


Thank you very much! :)