LED and Resister arrengement

Thread Starter

Vagish

Joined Apr 1, 2013
1
Where should I connect the current limiting resister--At the cathode or at the anode of LED,when
1)LED is connected in pulled up fashion and uC is sinking current.
2)LED is connected in pulled down fashion and uC is sourcing current.
 

WBahn

Joined Mar 31, 2012
33,178
All of them.
Hmmmm.

If the answer is "yes" to all of them, then what are all the possible circuits that could be formed and would any of them actually work? :p

My guess is that it would become one them them, "depends on what the definition of 'is' is" situations.
 

spinnaker

Joined Oct 29, 2009
7,830
Where should I connect the current limiting resister--At the cathode or at the anode of LED,when
1)LED is connected in pulled up fashion and uC is sinking current.
2)LED is connected in pulled down fashion and uC is sourcing current.
If the mcu is sourcing current and can't source more than what the LED is rated then there is no real need for a current limiting resistor.
 

WBahn

Joined Mar 31, 2012
33,178
If the mcu is sourcing current and can't source more than what the LED is rated then there is no real need for a current limiting resistor.
I wouldn't recommend that approach unless there was a compelling reason.

First, the maximum current rating for the port is a merely a guarantee that it can supply at least that much. There is no spec on how much more it might be able to source.

Second, the actual amount it can source is going to vary with lots of things, including temperature, supply voltage, total supply current for the chip, how old the part is, exactly which pin is being used, how many other pins are also in a current-limiting mode, and on, and on.
 

JohnInTX

Joined Jun 26, 2012
4,787
I wouldn't recommend that approach unless there was a compelling reason.

First, the maximum current rating for the port is a merely a guarantee that it can supply at least that much. There is no spec on how much more it might be able to source.

Second, the actual amount it can source is going to vary with lots of things, including temperature, supply voltage, total supply current for the chip, how old the part is, exactly which pin is being used, how many other pins are also in a current-limiting mode, and on, and on.
It will also make r-m-w I/O operations (bsf, bcf etc) on midrange/baseline PICs problematic.
 

ErnieM

Joined Apr 24, 2011
8,415
If the mcu is sourcing current and can't source more than what the LED is rated then there is no real need for a current limiting resistor.
Here it depends on what "can't" means.

One meaning is the pin has a maximum current it can safely deliver. In this case a resistor is required to limit current below this value.

Another possible meaning is the pin has a maximum current limit to the amount of current it can supply. If that limit is below what the LED is rated then no resistor is required.

Every device I have ever worked with has been spec'ed with the first definition. I am unaware of any device with a current limited output pin.
 

WBahn

Joined Mar 31, 2012
33,178
Here it depends on what "can't" means.

One meaning is the pin has a maximum current it can safely deliver. In this case a resistor is required to limit current below this value.

Another possible meaning is the pin has a maximum current limit to the amount of current it can supply. If that limit is below what the LED is rated then no resistor is required.

Every device I have ever worked with has been spec'ed with the first definition. I am unaware of any device with a current limited output pin.
The usual definition is that it is the maximum current that the device is guaranteed to be able to deliver and that it can do so and still be guaranteed to operate within spec. For instance, when a digital output says it can source a maximum of 20mA when outputing a HI, that means that as long as you don't pull more than 20mA from it that the voltage at the output will remain above V_OHL over the entire range of operating conditions that is spec'ed. Any given part will usually supply noticeably more than that while maintaining the spec'ed voltage and quite a bit more still before it truly maxes out.
 
Top