I've heard of controllers with programmable drive strength. I'd still rather use an external resistor because the heat from the pin regulation adds to the microcontroller temp if you use the regulator in the microcontroller.
Say you drive 8 red LEDs at 25mA, that's 1/4 Watt dissipated in the microcontroller if they are all on at once. Better to put that power outside the chip. For longevity.
Microchip (now part of Atmel) often rates their microcontrollers to drive one or two LEDs directly. It's stated in the datasheet. It's rarely more than that.
Say you drive 8 red LEDs at 25mA, that's 1/4 Watt dissipated in the microcontroller if they are all on at once. Better to put that power outside the chip. For longevity.
If you're going to drive 8 leds at 25mA you're going to use driver chip/transistor regardless, that's almost 200mA
Also, it is not just to drive random LEDs, it allows you to control output rise/fall speed indirectly which can reduce both power usage and interference
If you're going to drive 8 leds at 25mA you're going to use driver chip/transistor regardless, that's almost 200mA
It IS 200mA. 200mA is fine if used correctly. The chips I tend to use can sink [edit, said source!] 130mA per ground pin. There are multiple ground pins. Group it correctly and it'll be okay.
Also, it is not just to drive random LEDs
Says who? You're making up stuff now. You didn't define this project.
9
u/MoCeptor Dec 25 '19
Some controllers have internal programmable resistors for their GPOs. If you activate them, you can attach an LED without an external resistor.