unit 20 including an up down converter not shown and a plurality of registers not shown outputs a binary code bc according to the detection signals up dw and hd of the phase detecting unit 10 that is it outputs binary codes mbc and sbc of n bits or a binary code mbc of n m bits according to an enable signal sden of the level detecting unit 70 the main code converting unit 30 converts the binary code mbc of upper bits n m of the binary code generating unit 20 into a thermometer code mtc and the sub code converting unit 40 converts the binary code sbc of lower bits m of the binary code generating unit 20 into a thermometer code stc the level detecting unit 70 compares an output voltage vdac from the main and sub digital to analog converting units 50 and 60 with a predetermined reference voltage vref and outputs an enable signal sden according to the result of the comparison the predetermined reference voltage vref is obtained at a point when a gain of a variable delay line is sharply increased here if the output voltage vdac is lower than the reference voltage vref the sub code converting unit 40 enables the sub digital to analog converting unit 60 according to the enable signal sden if the output voltage.