This subject matter relates generally to electronic circuits, and more particularly to trimming oscillator circuits.
Many modern electronic circuits (e.g., microcontrollers) use internal CMOS oscillators to generate clocks. In many applications, a low variation CMOS oscillator is needed. Conventional CMOS oscillators are manually trimmed by test engineers with dedicated, external tester resources. Some CMOS oscillators use a resistive-capacitive (RC) structure.
A conventional RC oscillator with a Schmitt trigger is shown in
An auto trimming oscillator includes a Successive Approximation Register (SAR), a frequency detector and an n-bit comparator. The SAR is used to iteratively trim the oscillator based on a difference between the oscillator frequency and a reference frequency. The oscillator is trimmed to deliver a clock having a frequency which substantially matches the reference frequency.
Some advantages of the disclosed auto trimming oscillator include but are not limited to: fast and accurate determination of oscillator trimming values, low cost fabrication (small area), and a robust, fully digital, built-in solution that can free test resources during production tests.
In some implementations, the frequency detector 304 counts the number of edges of both the oscillator 302 clock and the reference clock for a period of time T defined in reference to
T=Minimum[1/(F(i)−F(i−1))]], i<2^n−1,
where n=number of trimming bits and F(i)=output frequency of oscillator 302 for code i.
The trimming sequence is described in reference to
The comparator 306 (e.g., a 1.5 bit comparator) determines from an output of the frequency detector 304 if the oscillator 302 is faster, slower or the same as the reference clock. Using a 1.5 bit comparator rather than a 1 bit comparator improves the trimming accuracy by half a bit.
The SAR 308 receives the comparator 306 output (e.g., +1, 0, −1) at each step of the trimming sequence, thus building up a digital code in the SAR 308 that can be applied to trimming circuitry in the oscillator 302 to adjust the oscillator 302 frequency to match or substantially match the reference frequency. The use of the SAR 308 to close a feedback loop with the oscillator 302 improves the speed of the trimming sequence. If the oscillator 302 is an RC oscillator, then the digital code can be used to adjust a resistor and/or capacitor value, which, in turn, adjusts the frequency of the oscillator 302. In some implementations, the resistor of the oscillator 302 (e.g., resistor 106) can be adjusted using an n-bit (e.g., 7-bit digital code) binary-weighted resistor network. In other implementations, the capacitor (e.g., capacitor 102) can be trimmer capacitor which is responsive to digital codes. Various know techniques can be used to implement a resistive network or tripper capacitor that is response to a digital code.
Table I below illustrates an example trimming sequence for providing a 7-bit SAR output code. At Step 0 (initialization), the SAR output code is set to midrange: 1000000.
Thus, at the end of the sequence, the trimming code found by the SAR will be 1010010.
Graphs “a” and “b” illustrate an example trimming sequence for providing the digital code necessary for the oscillator 302 to compensate for process variation. More particularly, graph “a” represents the frequency of the oscillator 302 versus time and Graph “b” is a digital bit (also referred to as the “eot signal”) that controls the overall trimming sequence duration. Graph “a” shows a 7 step trimming sequence where the reference frequency is about 4 MHz and the oscillator frequency is about 3.5 MHz. The auto trimming sequence starts when the eot signal (Graph “b”) goes low.
At step 0, Fosc is initialized by a trimming code representing a midrange value of the Fosc frequency range (e.g., 1000000). At step 1, Fref>Fosc, so the trimming code is increased to raise Fosc (e.g., 1100000). At step 2, Fosc>Fref, so the trimming code is decreased to lower Fosc (e.g., 1010000). At steps 3, 4, 5 and 6, the successive approximation technique attempts to substantially match (e.g., as close as possible) Fosc to Fref. After step 6, Fosc is reset to its midrange value of step 0. At the end of the trimming sequence, which corresponds to the rising of the eot signal, the digital code (trimming code) is available on the output of the SAR 308. The trimming code can be applied to a binary-weighted resistor network and/or other trimming circuit (e.g., a trimmer capacitor) in the oscillator 302 to adjust the oscillator 302 frequency to substantially match the reference frequency.
Number | Name | Date | Kind |
---|---|---|---|
4272729 | Riley, Jr. | Jun 1981 | A |
4531102 | Whitlock et al. | Jul 1985 | A |
4855683 | Troudet et al. | Aug 1989 | A |
5696468 | Nise | Dec 1997 | A |
6242956 | McCollough et al. | Jun 2001 | B1 |
20030048139 | Chien et al. | Mar 2003 | A1 |
20070296509 | Yang et al. | Dec 2007 | A1 |
Number | Date | Country | |
---|---|---|---|
20100085121 A1 | Apr 2010 | US |