The resistor value can be calculated as follows:R = (Vs - Vf) / If
= (Supply Voltage - Forward Voltage) / Forward Current
Note that If is in Amps, NOT Milliamps! (20mA = 0.02A)
Guide and Tutorials to various topics which are taught in Electronic Engineering.
The resistor value can be calculated as follows: