Spread spectrum adjustment for an LC circuit
A controller and a method is provided for controlling a capacitance of an LC circuit having a circuit frequency including, a variable capacitor to couple with an external inductor as part of an LC circuit, a target value, a spread spectrum function to generate an adjustment value, and a circuit to poll the target value, call the spread spectrum function, and set a capacitance of the variable capacitor based on the sum of the target value and the adjustment value.
1. A controller for controlling a capacitance of an LC circuit having a circuit frequency, comprising:
a variable capacitor to couple with an external inductor as part of an LC circuit;
a target value;
a spread spectrum function to generate an adjustment value;
a circuit to poll the target value, call the spread spectrum function, and set a capacitance of the variable capacitor based on the sum of the target value and the adjustment value; and
an adjustment circuit including a frequency comparator circuit to compare a frequency of the LC circuit against a reference frequency and adjust the target value based upon the comparison between the LC circuit frequency and the reference frequency.
2. The controller of claim 1 , wherein the spread spectrum function is a random or pseudo random number generator.
3. The controller of claim 1 ,
wherein the adjustment circuit increases the target value when the LC circuit frequency is higher than the reference frequency, and
decreases the target value when the LC circuit frequency is lower than the reference frequency.
4. The controller of claim 3 , wherein the spread spectrum function is a random or pseudo random number generator.
5. The controller of claim 1 , wherein the spread spectrum function is one of: a ramp function, a triangle function, a sawtooth function, and a sinusoidal function.
6. The controller of claim 1 , wherein the spread spectrum function is one of: spreading above a setpoint in up-spreading, below a setpoint in down-spreading, and around a setpoint in center-spreading.
7. The controller of claim 1 , wherein the LC circuit includes a proximity/position detection sensor.
8. A method of trimming a capacitance, comprising:
providing a variable capacitance in an integrated circuit coupled to leads for coupling to, and in parallel with, an external inductor as part of an LC circuit,
setting a target value for the variable capacitance,
on a regular interval, determining an adjustment value from a spread spectrum function,
setting the variable capacitance based on the sum of the target value and the adjustment value,
comparing a frequency of the LC circuit against a reference frequency, and
adjusting the target value based upon the comparison between the LC circuit frequency and the reference frequency.
9. The method of claim 8 , wherein setting the target value comprises:
increasing the target value when the LC circuit frequency is higher than a reference frequency, and
decreasing the target value when the LC circuit frequency is lower than the reference frequency.
10. The method of claim 9 , comprising terminating setting the target value after both increasing and decreasing the target value.
11. The method of claim 9 , wherein setting the variable capacitance comprises using the sum of the target value and the adjustment value to select a number of capacitors to combine to form a capacitor with the target capacitance.
12. The method of claim 9 , wherein the spread spectrum function is one of: a ramp function, a triangle function, a sawtooth function, and a sinusoidal function.
13. The method of claim 9 , wherein the spread spectrum function is one of: spreading above a setpoint in up-spreading, below a setpoint in down-spreading, and around a setpoint in center-spreading.
14. The method of claim 8 , wherein the spread spectrum function generates a random or pseudo random number in a range such that adding the output of the spread spectrum function to the target value remains within a minimum and a maximum quantum of available variable capacitance.
15. The method of claim 8 , wherein the LC circuit includes a proximity/position detection sensor.
16. A circuit comprising:
an LC circuit comprising:
an inductor; and
a capacitor, and
a controller coupled to the LC circuit for controlling a capacitance of the LC circuit having a circuit frequency, the controller comprising:
a variable capacitor to couple with the LC circuit;
a target value;
a spread spectrum function to generate an adjustment value;
a circuit to poll the target value, call the spread spectrum function, and set a capacitance of the variable capacitor based on the sum of the target value and the adjustment value; and
an adjustment circuit including a frequency comparator circuit to compare a frequency of the LC circuit frequency against a reference frequency and adjust the target value based upon the comparison between the LC circuit frequency and the reference frequency.
17. The circuit of claim 16 , wherein the spread spectrum function is a random or pseudo random number generator.
18. The circuit of claim 16 , wherein the adjustment circuit increases the target value when the LC circuit frequency is higher than the reference frequency, and
decreases the target value when the LC circuit frequency is lower than the reference frequency.
19. The circuit of claim 16 , wherein the spread spectrum function is one of: a ramp function, a triangle function, a sawtooth function, and a sinusoidal function.