(41) LED Resistor Picker - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Software Libraries (/forum-10.html) +--- Forum: HP-41C Software Library (/forum-11.html) +--- Thread: (41) LED Resistor Picker (/thread-7802.html) |
(41) LED Resistor Picker - damaltor - 02-20-2017 12:39 PM This program allows to pick a resistor for an LED. It uses the variables VCC (input voltage), U.F (forward voltage of the LED), R (resistor) and I (current through the LED) and can claculate any of the four after giving it the three others. It works similar to the TVM program of the advantage module: It uses USER mode and displays a menu which can be used like a softkey menu. Entering a number and pressing the corresponding key sets a variable to a value, and pressing a key without keying in a value before will calculate the selected variable. It is not the shortes possible program, but it works nicely and is easy to use. Code: VCC Example 1: Finding a Resistor for a 2.2V LED with 5V input voltage and 20 mA Code: Input Output Example 2: Find maximum allowed input voltage for an optocoupler which has a forward voltage of 1.5V and a max. current of 10 mA if a resistor of 1000 Ohms is used. Is 12V as input voltage ok? Code: Input Output The program has 70 Steps in 20 registers and fits onto one magnetic card using both sides. It uses storage registers 01 to 04. Code: 01 LBL "LEDR" |