Patent ID: 8432230

Claim:
An oscillator, comprising: an oscillator unit, which generates an oscillation signal; a frequency comparer, which receives the oscillation signal from the oscillator unit, and compares the frequency of a preset reference signal and the frequency of the oscillation signal based on a preset reference data, the preset reference data corresponding to a target frequency; a Successive-Approximation-Register (SAR) comparer, which obtains initial control bits to control a frequency of the oscillator unit based on the comparing result of the frequency comparer; and a post process module, which generates adjacent control bits based on the initial control bits, selects one of the initial control bits and adjacent control bits as final control bits based on a comparison of the preset reference data with the initial control bits and the adjacent control bits, and outputs the final control bits to the oscillator unit, wherein the oscillator unit performs auto-trimming based on the final control bits.