Patent ID: 7940136

Claim:
An oscillator comprising: a first setting module comprising: a first switch device to generate a first switch signal according to a first oscillating signal; an NMOS comprising a drain to receive a first charging current and a gate to receive the first switch signal, wherein the drain is charged when the gate is not turned on by the first switch signal and is discharged when the gate is turned on by the first switch signal; and an inverter connected to the drain to generate a first setting signal; a second setting module comprising: a second switch device to generate a second switch signal according to a second oscillating signal; and a comparator to receive the second switch signal and a reference voltage to generate a second setting signal, wherein the second setting signal goes high when the voltage of the second switch signal is higher than the reference voltage and goes low when the voltage of the second switch signal is lower than the reference voltage; and a flip-flop module to generate the first and the second oscillating signal according to the first and the second setting signal, wherein when the first setting signal is high, the first oscillating signal is high and the second oscillating signal is low, when the second setting signal is high, the first oscillating signal is low and the second oscillating signal is high.