In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Beau Schwabe wrote: Electronegativity, I'm not sure that you can relate the two numbers 283.3 and 1120 the way that you are referring to them. ( I could be having a dense moment though) This ratio you see is originating from the voltage across the current limiting resistor in series with the LED. Across one scenario, the voltage is 3.35V while in the other circumstance the voltage is 0.85V. In BOTH cases the goal is to maintain 3mA across the LED. Let me try to put it another way... If there is a 100% Duty cycle we would assume 5V 100% of the time. The normal formula for determining the Current limiting resistor for a LED is: Rled = (Vsupply - Vled) / Iled If we want to include Duty cycle, the formula becomes: Rled = ( ( Vsupply x DutyCycle ) - Vled) / Iled Basically what you are comparing between 283.3 and 1120 is the Duty Cycle and the resistor required to maintain 3mA across the LED. See table below: [code] DutyCycle Rled 100% 1116.7 Ohms 90% 950 Ohms 80% 783.3 Ohms 70% 616.7 Ohms 60% 450 Ohms 50% 283.3 Ohms 40% 116.7 Ohms 35% 33.3 Ohms 30% -50 Ohms [/code] Note: -50 Ohms at 30% indicates a voltage less than the forward LED voltage ( LED is OFF) Power in all cases will be 4.95mW across the LED since we are forcing the current to be 3mA. Power across the Current Limit resistor will vary between 10.05mW at 100% and 0.299mW at 35% P = I * V or P = I^2 * R For 100%... P = 3mA^2 * 1116.7Ohms P = 0.000009 * 1116.7Ohms P = 10.05mW For 35% P = 3mA^2 * 33.3Ohms P = 0.000009 * 33.3Ohms P = 0.299mW The goal here is to get as little current as possible across the resistor. Ideally, you would not even have a resistor, and just generate a Duty Cycle that is equal to the forward voltage drop of your LED. However in the real world TEMPERATURE is your enemy, and can cause the forward voltage of your LED to slightly increase or decrease. Having a resistor here for a little "padding" can be your friend in this case. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=89554#m89886 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2005 (http://www.dotNetBB.com)