PURPOSE: To use the optical mouse in a mouse pad in which nonuniform line patterns are formed by generating a follow-up potential tracing the change of a level by an automatic reference voltage setting circuit, and impressing it as the reference potential of a comparator circuit.
CONSTITUTION: When the local nonuniformity or dirt is present in the line patterns on the mouse pad face, amplitude center levels Ca and Cb varied. Integration circuits 8Xa and 8Xb integrate analog signals AXa and AXb, and integration variation values Δa and Δb follow-up the phases of the analog signals AXa and AXb while delaying by a prescribed time constant, so that reference voltages AXa' and AXb' obtained by adding the AC integration variation values Δa and δb to a DC reference voltage Vo follow-up the variance of the amplitude center levels Ca and Cb, and automatic bias setting can be attained. Thus, when the amplitude center levels Ca and Cb increase or decrease, the reference voltages AXa' and AXb' also increase or decrease, and the analog signals AXa and AXb don't cross the reference voltages AXa' and AXb' in any case.