The following members are included: a light receiving element which
outputs an electric signal corresponding to ambient light; an A/D
converter which converts the electric signal output from the light
receiving element into a digital signal; a register which stores the
digital signal output from the A/D converter and determines the duty
ratio of a PWM signal based on the digital signal; and a PWM controller
which outputs the PWM signal based on the duty ratio output from the
register.