Sink or Source?

I got into a discussion yesterday about sinking current through the UNO DIO's rather than sourcing current from one. I recall sourcing required at least one more internal transistor than sinking and it was better longevity wise to sink current to ground. A friend says that's not necessarily the case with today's technology.

I couldn't find anything detailed enough to verify this. Specifically considering the Atmega328, does it matter?

Thanks

From the datasheet.

And more important.

The ATmega48/88/168/328 can better source (note 3 sum of all Ioh 150mA) then sink (note 4 sum of all Iol 100mA)

I see something different :rofl:

A high output for C0-C5, D0-D4 is max 150mA
A low output for C0-C5 is max 100mA and a low output for D0-D4 is 100mA, that makes 200mA together.

Conclusion: It does not matter

I second that :slight_smile:

The source currents sum up to 2x150 = 300 mA,
the sink currents sum up to 3x100 = 300 mA as well.

But the Absolute Maximum Ratings impose another limit at 200mA for Vcc and GND.

Frankly, IMHO if you're at the point where you're doing sums on output currents to see if your under some threshold, it's probably beyond time to rethink what you're doing; at a minimum, build a spreadsheet to automate your current checking, if that's what turns your crank.

A CPU is not the place to be maxing out on heat dissipation or source/sink rules. But, that's just me.

2 Likes

That's what I was looking for :+1:
I believe he was more right than I. This was a theoretical discussion over too much brew

Thank you

That isn't right. If I use only B0-B5 as output. Then I can 150mA source and 100mA sink. What makes 25mA source/output or 16mA sink/output.

What not will say that a controller use as driver is the good way to go. Using an transistor, mosfet or driver IC like ULN2003/ULN2803 or MIC2981is much better.

Yes, that is what the datasheet says, so you are right.

The output circuit for a pin is the same for sink and for source current. If someone wonders what the best use for the pin is, then it does not matter.
However, the chip is designed in a way that it has restrictions when multiple pins are combined.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.