To prevent malfunction due to an external disturbance light such as a fluorescent light in a receiver for an infrared ray remote commander.
An-optical code signal subject to photoelectric conversion by a photo diode PD is given to a preamplifier A1, an amplifier A2 and a BPF, where a carrier frequency component is extracted, and its level is discriminated by a detection circuit 12 with a threshold voltage Vth set by a pulse width discrimination circuit 13 and the discrimination result is outputted from an output terminal 14 as a code signal pulse. A peak level being a voltage division level is extracted via voltage division resistors R11, R12, and a peak hold circuit 21 in the pulse width discrimination circuit 13 and the peak level is given to a detection circuit 22, where an output of the BPF is detected and a pulse component of the code signal is extracted. The pulse width is converted into a voltage by an integration circuit 23 and when the voltage is discriminated to be at the outside of a prescribed range at comparators A11, A12, a threshold level change circuit 25 increases the threshold voltage Vth.