3 ms·
It’s not protective circuitry, the current limit just comes from the fact that you don't have an infinitely large output MOSFET driving the IO. Usually the driv
by evancox100 5y ago
It’s not protective circuitry, the current limit just comes from the fact that you don't have an infinitely large output MOSFET driving the IO. Usually the driving capability will be spec'd as minimum Iol @ a given Vol, and minimum Ioh at a given Voh (output low current, output low voltage, etc). Typically Iol/Ioh will be in the 1 mA to 5 mA range, sometimes selectable with different drive strengths.
Some things to watch out for:
Typically the spec'd Vol/Voh would be pretty close to VSS/VDD, for example 0.3 V above/below. If you were really driving the LED hard, you could get a lot more current if you drive the IO harder than that, though the increase isn't linear and eventually you will put the IO MOSFET into saturation, and the current will top out.
Also, most specs I've dealt with have just a minimum drive current, so you don't know what the upper end of that could be. Rough rule of thumb: if the minimum is X, the typical might be 2x, and the max might be 4x. This is probably the biggest drawback of this idea, since there is such a huge range to what you'll get. (And note that this affects you even if you DO use an external current limiting resistor. To overcome this you need to actually regulate the current flowing through the LED via a feedback loop.)
Also, there may be a total current limit for the micro that is less than the sum of the individual IO drive capabilities, since the micro can only dissipate so much heat internally, or the power rails can only handle so much combined DC current. So you might only be able to drive 10% of the micro's GPIO pins at maximum current.
These are all things to watch out for. For a robust/production design, you should probably use another solution, but for tinkering it will probably be fine.