Systems and methods disclosed herein relate to the field of electronic circuits and, more specifically, to systems and methods that calibrate resistor-capacitor (RC) circuits.
RC filters are commonly used in integrated circuits to control the frequency of poles and zeros. However, due to manufacturing defects and variations in operating conditions, there is typically a 25% to 50% variation in resistance and capacitance values of the RC filters. One way of accounting for these variations is to use a variable capacitance array, which adjusts the value of the capacitance to maintain the value of the RC time constant and control the frequency of poles and zeros.
Prior to operation, switch 118 is closed and VN is set to ground. When operation begins at time tzero, digital logic 116 sends a switch pulse to open switch 118, digital counter 120 begins counting the rising edges of clock signal CLK, and VN starts increasing exponentially according to the equation:
V
N
=V
max(1−et/τ),
where Vmax represents the maximum voltage across capacitor 112, t represents the elapsed time and τ represents the RC time constant.
As soon as VN exceeds VREF, comparator 122 sends a comparison signal to digital counter 120, causing digital counter 120 to stop counting and record the current count at time tcmp. At time tcmp, VN is approximately equal to VREF and t is equal to tcmp-tzero. Once the count is recorded, the falling edge of the switch pulse causes switch 118 to close. When switch 118 closes, counter 120 is reset to zero and VN discharges back to ground.
Digital logic 116 captures the number of clock pulses counted by counter 120 and solves the above equation to determine the value of τ. The calculated value of τ is compared to a predetermined time constant and, depending on the comparison, digital logic 116 sends a new DCW to increase or decrease the capacitance of capacitor 112 by one-step. However, if the difference between the value of τ and the predetermined time constant is not sufficiently adjusted by a one-step increase or decrease, the process is repeated at a second clock period, for an additional one-step change. Under such circumstances, a comparison is performed for every clock period until the desired value of τ is reached.
One of the problems with calibration circuit 100 is that multiple comparisons lead to increased power consumption. Further, if a comparison is made every clock period, comparator 122 and counter 120 must be reset each clock period and digital logic 116 must solve an exponential equation each clock period. These steps may cause delays and inaccuracies. In addition, calibration circuit 100 is limited to calibrating the RC circuit at a fixed frequency.
Consistent with embodiments of the invention, a calibration apparatus is provided. The apparatus comprises an RC integrator circuit;, a bandwidth setting controller to provide a bandwidth setting code indicating a reference bandwidth value for calibration of the RC integrator circuit; and a capacitance code generator, coupled to the RC integrator circuit, to generate a capacitance code to adjust a capacitance of the RC integrator circuit using the bandwidth setting code and a current capacitance value of the RC integrator circuit.
Also consistent with embodiments of the present invention, there is provided an apparatus comprising an RC integrator circuit; a bandwidth setting controller to provide a bandwidth setting code indicating a reference bandwidth value for calibration of the RC integrator circuit; and a capacitance code generator, coupled to provide feedback to the RC integrator circuit, to adjust capacitance of the RC integrator circuit using the bandwidth setting code and a current capacitance value of the RC integrator circuit.
Further consistent with embodiments of the present invention, a calibration apparatus is provided. The apparatus comprises an RC integrator circuit including an output terminal; a control clock generator, to generate a plurality of control clocks; a counter, coupled to the control clock generator to count clock pulses of at least one of the plurality of control clocks; a comparator, coupled to the output terminal, to compare a reference voltage with a voltage at the output terminal and to generate a trigger event to trigger the counter to stop counting; a digital controller to receive the counted clock pulses and to generate a bandwidth setting code; and a capacitance code generator, coupled to the RC integrator circuit, to generate a capacitance code to adjust a capacitance of the RC integrator circuit using a current capacitance value of the RC integrator circuit and the bandwidth setting code.
Also consistent with embodiments of the present invention, a method for calibrating an RC integrator circuit is provided. The method comprises receiving a bandwidth setting code indicating a reference bandwidth value for calibration of the RC integrator circuit; calculating a current capacitance value of the RC integrator circuit; and generating a capacitance code to adjust the current capacitance value of the RC integrator using the bandwidth setting code and the current capacitance value of the RC integrator circuit.
Additionally consistent with embodiments of the present invention, a method for calibrating an RC integrator circuit is provided. The method comprises generating a plurality of control clocks; counting clock pulses of at least one of the plurality of control clocks; comparing a reference voltage with a voltage at an output terminal of an RC integrator circuit; causing the counter to stop counting; calculating a difference between a bandwidth setting code and a number of the counted clock pulses; and adjusting the capacitance of the RC integrator circuit based on the difference.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate various embodiments. In the drawings:
In the following description, for purposes of explanation and not limitation, specific techniques and embodiments are set forth, such as particular sequences of steps, interfaces and configurations, in order to provide a thorough understanding of the techniques presented herein. While the techniques and embodiments will primarily be described in context with the accompanying drawings, those skilled in the art will further appreciate that the techniques and embodiments can also be practiced in other circuit types.
Reference will now be made in detail to the exemplary embodiments of the invention, examples of which are illustrated in the accompanying drawings. Wherever possible, the same reference numbers will be used throughout the drawings to refer to the same or like parts.
Capacitors C220 and C222 may be implemented as capacitor arrays that function as digital-to-analog converters (DACs). For example, each of capacitors C220 and C222 may be implemented as an array of binary-weighted capacitors or as fractional-weighted capacitors. Alternatively, DACs may be coupled to capacitors C220 and C222 to set the capacitance value of the capacitors.
The capacitance value of capacitors C220 and C222 is set based on a digital capacitance code (CC) generated by a capacitance code generator 224. Capacitors C220 and C222 receive a CC and convert the CC to analog capacitance values. Further, a switch SW1 is coupled in parallel to C222 and a switch SW2 is coupled in parallel to capacitor C220. When switches SW1 and SW2 are closed, two voltages (Vop and Vout) at output terminals 216 and 218 of op-amp 214, may be at a common mode point of op-amp 214. Opening switches SW1 and SW2 may cause capacitors C222 and C220 to discharge, causing Vop to be charged to a maximum positive voltage output of op-amp 214 and causing Vout to be charged to a maximum negative voltage output of op-amp 214. The Vout terminal 218 of op-amp 214 is coupled to a comparator 226, which may be implemented using a digital or analog comparator. Comparator 226 is further provided with a reference voltage Vref and performs a comparison between Vout and Vref. Although Vop and Vout at output terminals 216 and 218 may be at a common mode point of op-amp 214 and Vout and Vref may be represented by single-ended signals, one skilled in the art will appreciate that calibration apparatus 200 may be implemented with differential signals. For example, op-amp 214 may amplify a difference between an input voltage across input terminals 210 and 212 and provide the amplified difference as a differential signal Vout. Similarly, Vref may be provided as a differential signal.
A source clock 228 provides clock pulses CLKin to a frequency divider 230 and comparator 226. Frequency divider 230 generates counter clock pulses CLKA by reducing the frequency of CLKin by 2M, where M is an integer indicating the number of comparisons performed by comparator 226 in one clock period of CLKA. CLKA may be input into an N-bit counter 232, where N is an integer indicating the number of bits used to calculate the digital capacitance of capacitors C220 and C222. N-bit counter 232 counts the number of clock pulses of CLKA being inputted in N-bit counter 232. CLKA may also be input into a frequency divider 234. Frequency divider 234 generates clock pulses CLKB by reducing the frequency of CLKA by 2(N+1), and provides CLKB to comparator 226 and to switches SW1 and SW2.
As is described in further detail below, when CLKB is high, switches SW1 and SW2 may be closed and Vop and Vout may be almost at the common mode point of op-amp 214. However, when CLKB becomes low, switches SW1 and SW2 may be pulsed open by CLKB and N-bit counter 232 may start counting clock pulses of CLKA. Opening switches SW1 and SW2 may cause capacitors C220 and C222 to discharge, thus causing Vout to be charged to the maximum negative voltage output of op-amp 214. The discharging behavior of C220 and C222 depends on a slew rate of op-amp 214, which is based on the respective capacitances of capacitors C220 and C222 and a saturation current of op-amp 214. The slew rate of op-amp 214 causes the discharge behavior to be more linear and precise than the exponential discharge behavior of conventional RC calibration apparatus. Comparator 226 compares Vout with Vref, while being clocked by CLKB and CLKin and the number of comparisons performed between Vout and Vref, during one clock period of CLKA, may be controlled by the frequency of CLKin.
When Vout is less than Vref and CLKB is low, comparator 226 generates a trigger event to trigger N-bit counter 232 to stop counting (236). The number of counted clock pulses is captured by a subtractor 238. Subtractor 238 is also connected to a bandwidth setting controller 240, which inputs an N-bit bandwidth code into subtractor 238. The N-bit bandwidth code serves as a reference value representing a calibrated bandwidth value of the RC circuit. Each time the RC circuit is calibrated, the bandwidth setting controller 240 provides the N-bit bandwidth code, representing a reference value for the calibration. Accordingly, the RC circuit may be calibrated at different bandwidths.
Subtractor 238 calculates the difference between the bandwidth setting code and the counted clock pulses. If a difference 242 is zero, a cut-off circuit 244 removes power from the power consuming analog circuits to prevent static power consumption and stops clocking the digital circuits to prevent dynamic power consumption and clock noise. The power may be removed when the difference is zero because a difference of zero indicates that the RC time constant is operating at the predetermined time constant and, therefore, there is no need to calibrate the circuit. However, when the difference is not zero, subtractor 238 sends the difference to an adder 246. Adder 246 is connected to capacitance code generator 224, which inputs a current value CC 248 into adder 246. Current CC 248 reflects the current capacitance values of capacitors C220 and C222.
To calibrate the RC circuit, capacitance code generator 224 generates a new value CC 250 based on the addition of the difference, calculated by the subtractor, and the current CC 248. CC 250 is provided as feedback to capacitors C220 and C222 to adjust the capacitance values of the RC circuit. The capacitance values are adjustable so that the RC time constant may be calibrated to the predetermined RC time constant.
This process may be repeated to calibrate the RC circuit at a different bandwidth or the RC circuit may be calibrated at different temperatures. Calibration apparatus 200 controls the time constant for an RC circuit based on the following relationship:
RC α TCLKANBWC,
where R represents the equivalent resistance of all the resistors in the RC circuit, C represents the equivalent capacitance of the RC circuit, TCLKA represents a clock period of the counter clock pulses, and NBWC represents an N-bit bandwidth code which may be set to arbitrary codes for corresponding RC time constants. The N-bit bandwidth code is inputted by bandwidth setting controller 240. Thus, the time constant (RC) based on the above equation is represented by a linear relationship and provides a precise and accurate time constant during the calibration.
Referring now to
In step 410, a bandwidth setting code reflecting the bandwidth at which the RC circuit is calibrated is inputted. In step 412, the difference between the bandwidth setting code and the number of counted clock pulses is determined. When the difference between the bandwidth setting code and the number of counted clock pulses is zero, power and clock are removed from the digital and analog circuitry in calibration apparatus 200 and calibration is stopped (step 414). However, when the difference is not zero, the method proceeds to step 416 at which a new capacitance code may is generated by adding the difference calculated in step 412 to the current capacitance value of the RC circuit. Next, in step 418, the new capacitance code is be converted into an analog capacitance value and the RC circuit is calibrated by setting the capacitance value of the RC circuit to the converted analog capacitance value. Next, in step 420 it may be determined to re-calibrate the RC circuit at a different bandwidth by returning to step 404. If the RC circuit is not to be re-calibrated, the calibration is completed and the method ends (step 422).
Calibration apparatus 600 controls part of the calibration using a digital controller 604. For example, when Vout is less than Vref and CLKB is low, comparator 226 generates a trigger event to trigger N-bit counter 232 to stop counting 236, and the number of counted clock pulses is captured by digital controller 604. Digital controller 604 includes various digital components (not shown) including a subtractor circuit, an adder circuit, a bandwidth setting controller, and a cut-off circuit, similar to the corresponding features illustrated in
The foregoing description has been presented for purposes of illustration. It is not exhaustive and does not limit the invention to the precise forms or embodiments disclosed. Modifications and adaptations of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the disclosed embodiments of the invention.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
This application claims priority from U.S. Provisional Patent Application No. 60/960,989 filed Oct. 24, 2007, the contents of which are hereby incorporated by reference.
Number | Date | Country | |
---|---|---|---|
60960989 | Oct 2007 | US |