Yep, my LED's require 20mA at 100% duty-cycle, but I'm operating them at 25% (4 digits). I know I can go more but don't have the datasheet -- I feel certain that I won't damage them with 25ma at 25% duty-cycle. The fun part is that I just tried it (jumpered across the resistors to bypass them), and the intensity change was very difficult to notice, but it seemed to work well. (Not like I'll actually visualize the excess current on the port :-) But oh well, I'll behave and keep the R's. Thanks, -Neil. -----Original Message----- From: pic microcontroller discussion list [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of Byron A Jeff Sent: Sunday, May 19, 2002 6:27 PM To: PICLIST@MITVMA.MIT.EDU Subject: Re: [PIC]: Output drivers... On Sun, May 19, 2002 at 05:33:56PM -0500, Pic Dude wrote: > In keeping with my philosophy of minimal component-count in any circuit, > I'm wondering if it is an acceptable strategy to run multiplexed 7-segment > LED's thru a 16F872 output port w/o the use of current-limiting resistors, > when the current I need is the max rating of the output port (25ma source > or sink). Nope. You're mistaking the given max rating with the highest possible rating. The max rating is the maximum amount of current you should pull through an I/O pin. However it isn't the maximum amount of current that can be pulled through the pin, only the max current that can be pulled through the pin without permanent damage. If that were the case no LED would need a current limiting resistor because it would only pull its max remommended current. But anyone who as ever POOFED and LED because of a lack of resistor knows better. The LED will try to pull as much current as is can, and most can easily draw several amps of current before disintegrating. And with LED's it's even more tricky because the max current allowed is tied to duty cycle. Many IR LED circuits are designed to pump an amp or two into the LEDs, however the duty cycle is held to 10 percent or less. This gives the LED time to recover and dissapate excess heat. > > Typically I would calculate the resistor as R = (V-port - V-led) / I-led, > but if I-led is already where I want it, do I still need to insert a > resistor for the required voltage drop? Yes. and also to limit the amount of current because the LED can only draw the amount of current that's allowed across the resistor. So if it's a normal LED with a 1.7V forward drop for example you'd still need (5-1.7)/.25 -> 148 ohm. So use a 150 ohm one and be happy. > > A little more in-depth, what exactly does the datasheet's "Max o/p current > sourced by any pin" mean? The max that it can put out, or the max that I > should try to get out of it? The latter. You do understand then. You can pull 50 or 100ma through a pin. However you'll burn it out soon enough. BAJ -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.