A device for controlling a diode comprising: a first terminal of application of a first power supply voltage; a second terminal of application of a second power supply voltage; a circuit of application of a voltage onto a third terminal configured to be connected to an anode of the diode, said third terminal being connected to a first input terminal of said circuit; a second input terminal of said circuit; and a resistor coupled between said second terminal and a fourth terminal configured to be connected to a cathode of said diode, said fourth terminal being coupled to a third input terminal of the circuit, the voltage provided by said circuit on the third terminal being a function of signals present on the first, second, and third input terminals,, and of said circuit; and said circuit comprising: a circuit for generating said voltage on said third terminal, comprising a first input terminal configured to receive a signal (VCTRL) and a second input terminal connected to said first input terminal of said circuit; a comparator having a first input connected to said third input terminal and having a second input connected to said second input terminal; and an adder having a first input connected to the output of said comparator and having a second input connected to a terminal of application of a voltage (VPRESET), the output of the adder being connected to said first input terminal of the circuit for generating said voltage, wherein the voltage (VPRESET) applied onto the second input terminal to the comparator has a positive value smaller than the conduction threshold of the diode. a first terminal of application of a first power supply voltage; a second terminal of application of a second power supply voltage; a circuit of application of a voltage onto a third terminal configured to be connected to an anode of the diode, said third terminal being connected to a first input terminal of said circuit; a second input terminal of said circuit; and a resistor coupled between said second terminal and a fourth terminal configured to be connected to a cathode of said diode, said fourth terminal being coupled to a third input terminal of the circuit, the voltage provided by said circuit on the third terminal being a function of signals present on the first, second, and third input terminals,, and of said circuit; and said circuit comprising: a circuit for generating said voltage on said third terminal, comprising a first input terminal configured to receive a signal (VCTRL) and a second input terminal connected to said first input terminal of said circuit; a comparator having a first input connected to said third input terminal and having a second input connected to said second input terminal; and an adder having a first input connected to the output of said comparator and having a second input connected to a terminal of application of a voltage (VPRESET), the output of the adder being connected to said first input terminal of the circuit for generating said voltage, wherein the voltage (VPRESET) applied onto the second input terminal to the comparator has a positive value smaller than the conduction threshold of the diode. a circuit for generating said voltage on said third terminal, comprising a first input terminal configured to receive a signal (VCTRL) and a second input terminal connected to said first input terminal of said circuit; a comparator having a first input connected to said third input terminal and having a second input connected to said second input terminal; and an adder having a first input connected to the output of said comparator and having a second input connected to a terminal of application of a voltage (VPRESET), the output of the adder being connected to said first input terminal of the circuit for generating said voltage, wherein the voltage (VPRESET) applied onto the second input terminal to the comparator has a positive value smaller than the conduction threshold of the diode.