A diode circuit includes a differential circuit having a first MOS transistor whose source is connected to a first input terminal, a second MOS transistor whose source is connected to a second input terminal and gate and drain are connected to a gate of the first MOS transistor, and a first resistive load connected to a drain of the first MOS transistor, and a third MOS transistor whose conductive state is controlled according to an output of the differential circuit.