The present invention provides a LED driver for control the brightness of
the LED. An energy-transferred element and a switch are connected in
series with the LED for controlling the current of the LED. A diode is
coupled to the energy-transferred element for freewheeling the energy of
the energy-transferred element through the LED. A control circuit is
developed to generate a control signal for switching the switch in
response to the LED current. The LED current is further adjusted in
response to a voltage signal of the LED. The value of the voltage signal
is correlated to the LED temperature. Therefore the LED current can be
programmed in accordance with the LED temperature.