Patent ID: 8085227

Claim:
A control device supplying a drive current to a light emitting element, comprising: an external terminal receiving a binary enable signal; a counter counting a number of pulses by being triggered by an edge in the enable signal which appears when the enable signal turns from a second logic level to a first logic level, the counter outputting a resulting count as digital data; a digital/analog converter converting the digital data into analog data and outputting the analog data; a current source generating a drive current whose current level is based on the analog data, the current source supplying the drive current to the light-emitting element; an oscillator generating a clock signal; a period detector counting a number of pulses in the clock signal to detect whether or not the enable signal has been kept at the second logic level for a predetermined period; a voltage detector detecting whether or not a power supply voltage has reached a predetermined voltage level; an on/off controller formed of a D flip-flop receiving at a data terminal thereof a logic signal in the second logic level, receiving at a set terminal thereof an inverted signal of the enable signal, receiving at a reset terminal thereof an output signal of the period detector, and receiving at a clock terminal thereof an output signal of the voltage detector; a first AND operator performing an AND operation of an output signal of the on/off controller and the output signal of the voltage detector; a switch controlling whether or not to supply a drive current to the light-emitting element based on an output signal of the first AND operator, a second AND operator performing an AND operation of the inverted signal of the enable signal and an output signal of the first AND operator; and a third AND operator performing an AND operation of the inverted signal of the enable signal and the output signal of the on/off controller, wherein a reset terminal of the counter and an enable terminal of the voltage detector each receive the output signal of the on/off controller, an enable terminal of the oscillator receives the output signal of the second AND operator, and a reset terminal of the period detector receives an output signal of the third AND operator.