PURPOSE: To facilitate the manufacture of an IC and to increase the degree of freedom of the selection of an oscillating element by detecting the kind of the oscillating element according to whether oscillation occurring at an external terminal for connecting the oscillating element is large or small, and making only the corresponding oscillation loop effective.
CONSTITUTION: A CR element is connected to external terminals EX1 and EX2, and when CR oscillation occurs, the waveform at a point (a) has a small amplitude. Consequently, an inverter I4 of a detecting circuit DET generates an H- level output and an inverter I3 generates an L-level output to set a flip-flop FF, whose Q output goes up to the level H to select the oscillation loop LP2 of a CR system. On the other hand, when a crystal system oscillates while a crystal oscillator is connected, the waveform at the point (a) has a large amplitude. Consequently, the outputs of the inverters I3 and I4 are both at the level H at a peak part and at the level L at the bottom part. Consequently, the flip-flop FF is reset and the Q' output goes up to the level H to select the oscillation loop LP1 of the crystal system.