Any temperature compensation voltage function generator, crystal oscillator and method for adjusting the resonant frequency thereof
By generating a temperature compensation voltage of arbitrary curve shape using an arbitrary temperature compensation voltage function generator and a transimpedance amplifier, the problem of low temperature drift accuracy in crystal oscillators is solved, and a high-precision temperature compensation effect is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHONGQING SOUTHWEST INTEGRATED CIRCUIT DESIGN
- Filing Date
- 2021-08-06
- Publication Date
- 2026-08-04
AI Technical Summary
Existing crystal oscillators suffer from low accuracy in temperature compensation, especially since the temperature drift of AT-cut quartz crystals cannot meet the requirements of communication systems. Traditional temperature compensation methods cannot adapt to the changes in curve shape caused by cutting angle deviations.
An arbitrary temperature-compensated voltage function generator is used to generate voltages and currents with different temperature coefficients. The current is summed using a transimpedance amplifier to generate a temperature-compensated voltage with an arbitrary curve shape. The temperature drift of the crystal resonant frequency is compensated by adjusting the capacitance value of the varactor diode.
It achieves high-precision temperature drift compensation for the crystal resonant frequency in the crystal oscillator, with a compensation accuracy of less than 1ppm, adapting to deviations at different cutting angles and improving the accuracy of temperature compensation.
Smart Images

Figure CN115706562B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of crystal oscillator technology, and in particular to an arbitrary temperature compensated voltage function generator, a crystal oscillator, and a method for adjusting the resonant frequency thereof. Background Technology
[0002] A crystal oscillator mainly consists of two parts: a resonator (usually a quartz crystal) and an oscillator. Quartz crystals can generate stable oscillation frequencies and are used in most clocks, communication systems, and computer systems, making them an indispensable component in modern electronics. Among these, AT-cut quartz crystals are commonly used as the resonator in crystal oscillators due to their excellent frequency stability. The temperature drift curve of the resonant frequency of an AT-cut quartz crystal approximates a cubic power function (Formula 1).
[0003]
[0004] Where f is the crystal resonant frequency, Δf is the frequency change, A3 is the cubic coefficient, A1 is the linear coefficient, A0 is the room temperature frequency offset, T is the temperature, and T0 is the room temperature. Most communication systems require the crystal oscillator's temperature drift to be less than 1 ppm, while AT-cut crystals typically have a temperature drift in the range of 10–20 ppm, which does not meet application requirements. Furthermore, deviations in the AT-cut angle also lead to significant dispersion in the crystal's temperature drift. See also Figure 1 This describes the change in the temperature drift curve shape of an AT-cut quartz crystal due to deviations in the cutting angle. Therefore, in applications, an oscillator is needed to accurately compensate for the inherent temperature drift and cutting dispersion of the crystal. Traditional temperature compensation methods use third- to fifth-order power function generators to compensate for the inherent temperature drift of the crystal. The shape of the function is relatively fixed and cannot accommodate the curve shape changes caused by deviations in the crystal cutting angle. The compensation accuracy is low and cannot meet application requirements. Therefore, the traditional method of using a power function generator to compensate for the inherent temperature drift of the crystal is ineffective. Summary of the Invention
[0005] In view of the shortcomings of the prior art described above, the purpose of this invention is to provide a technical solution for high-precision compensation of temperature drift of resonant frequency in crystal oscillators, so as to solve the above-mentioned technical problems.
[0006] To achieve the above and other objectives, the detailed technical solutions provided by this invention are as follows.
[0007] An arbitrary temperature compensated voltage function generator, comprising:
[0008] A reference voltage generation circuit generates a first reference voltage with zero temperature coefficient and N second reference voltages with zero temperature coefficient.
[0009] A negative temperature voltage generating circuit generates a first voltage with a negative temperature coefficient.
[0010] The non-inverting amplifier has its non-inverting input terminal connected to the first voltage, its inverting input terminal connected to its output terminal, and its output terminal outputting a second voltage with a negative temperature coefficient.
[0011] An inverting amplifier, whose non-inverting input is connected to the first voltage, whose inverting input is connected to the first reference voltage, and whose output output is a third voltage with a positive temperature coefficient;
[0012] N exponential current generators are arranged in parallel. The positive temperature voltage input terminals of the N exponential current generators are respectively connected to the third voltage, the negative temperature voltage input terminals of the N exponential current generators are respectively connected to the second voltage, the constant temperature voltage input terminals of the N exponential current generators are connected to the N second reference voltages one by one, and the output terminals of the exponential current generators output an exponential current that changes exponentially with temperature.
[0013] A linear current generator, whose input is connected to either the second voltage or the third voltage, and whose output is a linear current with a linear temperature coefficient;
[0014] A current mirror, whose current input terminal is simultaneously connected to the source current output terminals of N exponential current generators, and whose current output terminal is simultaneously connected to the leakage current output terminals of N exponential current generators.
[0015] A transimpedance amplifier, whose non-inverting input is connected to the current output of the current mirror and the output of the linear current generator, whose inverting input is connected to the first reference voltage, and whose output outputs a temperature compensation voltage.
[0016] Wherein, N is an integer greater than or equal to 2. The exponential current curve of the exponential current generator and the linear current curve of the linear current generator are both adjustable curves. The linear current and N exponential currents are summed by the transimpedance amplifier, and the sum of the currents is converted into the temperature compensation voltage output based on the transimpedance gain of the transimpedance amplifier. By adjusting the curve shape of the linear current and the N exponential currents, the temperature compensation voltage with any curve shape can be obtained.
[0017] Optionally, the non-inverting amplifier includes a first amplifier, the non-inverting input of the first amplifier is connected to the first voltage, the inverting input of the first amplifier is connected to the output of the first amplifier, and the output of the first amplifier outputs the second voltage; the inverting amplifier includes a first resistor, a second resistor, and a second amplifier, the non-inverting input of the second amplifier is connected to the first voltage after passing through the first resistor in series, the inverting input of the second amplifier is connected to the first reference voltage, the output of the second amplifier is connected to the non-inverting input of the second amplifier after passing through the second resistor in series, and the output of the second amplifier outputs the third voltage.
[0018] Optionally, the exponential current generator includes a transistor, a first adjustable resistor, a first selection switch, and a second selection switch. The base of the transistor serves as the constant-temperature voltage input terminal of the exponential current generator, and the base of the transistor is connected to the second reference voltage. The emitter of the transistor is connected to the output terminal of the first selection switch via the first adjustable resistor in series. The first input terminal of the first selection switch serves as the negative-temperature voltage input terminal of the exponential current generator, and the first input terminal of the first selection switch is connected to the second voltage. The second input terminal of the first selection switch serves as the positive-temperature voltage input terminal of the exponential current generator, and the second input terminal of the first selection switch is connected to the third voltage. The collector of the transistor is connected to the input terminal of the second selection switch. The first output terminal of the second selection switch serves as the source current output terminal of the exponential current generator, and the second output terminal of the second selection switch serves as the leakage current output terminal of the exponential current generator.
[0019] Optionally, the linear current generator includes a third selection switch and a second adjustable resistor. The second voltage is connected to the first input terminal of the third selection switch, the third voltage is connected to the second input terminal of the third selection switch, the output terminal of the third selection switch is connected to one end of the second adjustable resistor, and the other end of the second adjustable resistor serves as the output terminal of the linear current generator.
[0020] Optionally, the current mirror includes a first PMOS transistor and a second PMOS transistor. The source of the first PMOS transistor is connected to the operating voltage, the gate of the first PMOS transistor is connected to the drain of the first PMOS transistor, the drain of the first PMOS transistor serves as the current input terminal of the current mirror, and the drain of the first PMOS transistor is connected to the source current output terminal of the exponential current generator. The source of the second PMOS transistor is connected to the operating voltage, the gate of the second PMOS transistor is connected to the gate of the first PMOS transistor, the drain of the second PMOS transistor serves as the current output terminal of the current mirror, and the drain of the second PMOS transistor is connected to the drain current output terminal of the exponential current generator.
[0021] Optionally, the transimpedance amplifier includes a third amplifier and a third adjustable resistor. The non-inverting input of the third amplifier is connected to the drain of the second PMOS transistor and the other end of the second adjustable resistor. The inverting input of the third amplifier is connected to the first reference voltage. The output of the third amplifier is connected to the non-inverting input of the third amplifier via the series-connected third adjustable resistor. The output of the third amplifier outputs the temperature compensation voltage.
[0022] A high-precision analog temperature-compensated crystal oscillator includes:
[0023] Crystals produce stable frequency oscillations;
[0024] A voltage-controlled oscillator, whose input terminal is connected to one end of the crystal and whose output terminal is connected to the other end of the crystal, provides negative impedance to the crystal, enabling the crystal to start oscillating and oscillate stably;
[0025] An output drive circuit has its input terminal connected to the output terminal of the voltage-controlled oscillator and its output terminal connected to an external load to drive the external load.
[0026] The first varactor diode has its cathode connected to the input terminal of the voltage-controlled oscillator and its anode grounded.
[0027] The second varactor diode has its cathode connected to the output terminal of the voltage-controlled oscillator and its anode grounded.
[0028] The arbitrary temperature compensation voltage function generator described in any of the above items generates a temperature compensation voltage with an arbitrary curve shape;
[0029] A noise filter, whose input is connected to the output of the arbitrary temperature compensation voltage function generator, and whose output is simultaneously connected to the control terminals of the first varactor diode and the second varactor diode, filters out high-frequency noise from the temperature compensation voltage.
[0030] The erasable and rewritable non-volatile memory has its output connected to the arbitrary temperature compensation voltage function generator. It provides control codes to the arbitrary temperature compensation voltage function generator to adjust the curve shape of the temperature compensation voltage. Based on the adjustment of the temperature compensation voltage, it adjusts the capacitance values of the first varactor diode and the second varactor diode, thereby adjusting the equivalent load capacitance of the crystal to compensate for the temperature drift of the crystal's resonant frequency.
[0031] Optionally, the high-precision analog temperature-compensated crystal oscillator further includes:
[0032] The first capacitor array has one end connected to the input terminal of the voltage-controlled oscillator and the other end grounded, and the control terminal connected to the output terminal of the erasable and rewritable non-volatile memory.
[0033] The second capacitor array has one end connected to the output terminal of the voltage-controlled oscillator, the other end grounded, and the control terminal connected to the output terminal of the erasable and rewritable non-volatile memory.
[0034] The erasable non-volatile memory provides control codes for the first capacitor array and the second capacitor array, respectively, to adjust the capacitance value of the first capacitor array connected to the voltage-controlled oscillator and the capacitance value of the second capacitor array connected to the voltage-controlled oscillator, thereby adjusting the room-temperature resonant frequency of the crystal.
[0035] A method for adjusting the resonant frequency of a crystal oscillator includes the following steps:
[0036] Provides a linear current whose magnitude changes linearly with temperature and N exponential currents whose magnitude changes exponentially with temperature. The curves of the linear current changing with temperature and the curves of the exponential current changing with temperature are both adjustable curves, and N is an integer greater than or equal to 2.
[0037] The linear current and N exponential currents are summed, and the sum is converted into a temperature-compensated voltage output.
[0038] The temperature compensation voltage is applied to the control terminals of the two varactor diodes;
[0039] In the crystal oscillator, a varactor diode is connected to each end of the voltage-controlled oscillator. One end of the varactor diode is grounded and the other end is connected to the input terminal of the voltage-controlled oscillator. One end of the other varactor diode is grounded and the other end is connected to the output terminal of the voltage-controlled oscillator.
[0040] By adjusting the curve shapes of the linear current versus temperature curve and the N exponential current versus temperature curves, a temperature compensation voltage with an arbitrary curve shape is obtained, thereby controlling the capacitance values of the two varactor diodes, and further controlling the equivalent load capacitance of the crystal in the crystal oscillator to compensate for the temperature drift of the crystal resonant frequency.
[0041] Optionally, the method for adjusting the resonant frequency of the crystal oscillator further includes the step of:
[0042] A capacitor array is connected to each end of the voltage-controlled oscillator. One end of the capacitor array is connected to the input terminal of the voltage-controlled oscillator and the other end is grounded. One end of the other capacitor array is connected to the output terminal of the voltage-controlled oscillator and the other end is grounded.
[0043] The capacitance values of the two capacitor arrays connected to the voltage-controlled oscillator are adjusted, thereby adjusting the room-temperature resonant frequency of the crystal.
[0044] As described above, the arbitrary temperature-compensated voltage function generator, the high-precision analog temperature-compensated crystal oscillator, and the method for adjusting the resonant frequency of the crystal oscillator of the present invention have at least the following beneficial effects:
[0045] By summing the linear current and N exponential currents and converting the current to voltage, a temperature compensation voltage of arbitrary curve shape can be obtained. Applying this temperature compensation voltage to the control terminal of the varactor diode connected to both ends of the crystal oscillator allows for adjustment of the varactor diode's capacitance value, thereby controlling the equivalent load capacitance of the crystal in the crystal oscillator. This effectively compensates for the temperature drift of the crystal's resonant frequency. Simultaneously, by adjusting the curve shapes of the linear current and the N exponential currents, the curve shape of the temperature compensation voltage can be adjusted, making its curve shape infinitely close to the temperature drift curve of the crystal's resonant frequency, thus improving the accuracy of temperature drift compensation for the crystal's resonant frequency. Attached Figure Description
[0046] Figure 1 The diagram shows the shape change of the temperature drift curve of an AT-cut quartz crystal due to the deviation of the AT cutting angle.
[0047] Figure 2 The equivalent circuit model is shown as a crystal.
[0048] Figure 3 The diagram shown is a structural diagram of the arbitrary temperature compensated voltage function generator of the present invention.
[0049] Figure 4 Displayed as Figure 3 Circuit diagram of a medium-exponential current generator.
[0050] Figure 5 Displayed as in Figure 4 Based on this, four basic exponential current curves were obtained by changing the connection method of the first selection switch K1i and the second selection switch K2i.
[0051] Figure 6 The display shows a basic exponential current curve when the first selector switch K1i is connected to the negative temperature voltage V2 and the second selector switch K2i is connected to the leakage current output terminal.
[0052] Figure 7 Displayed as in Figure 6 Based on this, adjusting the voltage value of the isothermal voltage Vi causes a shift in the inflection point of the exponential current curve.
[0053] Figure 8 Displayed as in Figure 6 Based on this, the resistance value of the first adjustable resistor R3i is adjusted, and the slope of the exponential current curve changes.
[0054] Figure 9 The diagram shown is a circuit diagram of the arbitrary temperature-compensated voltage function generator provided by the present invention.
[0055] Figure 10 The diagram shown is a circuit diagram of an arbitrary temperature-compensated voltage function generator when N=3 in one embodiment of the present invention.
[0056] Figure 11 Displayed as Figure 10 The arbitrary temperature compensation voltage function generator generates four temperature compensation voltage function waveforms by changing the inflection point of the exponential current 3 and the compensation slope.
[0057] Figure 12 Displayed as Figure 10 The arbitrary temperature compensation voltage function generator generates four temperature compensation voltage function waveforms by adjusting the resistance value of the second adjustable resistor R4.
[0058] Figure 13 Displayed as Figure 10 By adjusting the resistance value of the third adjustable resistor R5 in the arbitrary temperature compensation voltage function generator, four temperature compensation voltage function waveforms are obtained.
[0059] Figure 14 The image shows the temperature compensation voltage function waveform of the output of an arbitrary temperature compensation voltage function generator when N=4 in one embodiment of the present invention.
[0060] Figure 15 The diagram shown is a structural block diagram of the high-precision analog temperature-compensated crystal oscillator of this invention. Detailed Implementation
[0061] As described in the background section, the inventors discovered that, based on the inherent temperature drift of the resonant frequency of AT-cut quartz crystals, the temperature drift of the crystal's resonant frequency can exhibit significant dispersion among multiple AT-cut quartz crystals of the same batch and specification due to variations in their cutting angles. Figure 1 As shown, the compensation accuracy is not high when using a temperature compensation voltage curve with a fixed output shape from a traditional power function generator to compensate for the temperature drift of the resonant frequency of multiple AT-cut quartz crystals in the same batch, and it cannot meet the needs of practical applications.
[0062] Meanwhile, the equivalent circuit model of the crystal in the crystal oscillator is as follows: Figure 2 As shown, according to the series resonant frequency calculation formula (2) and the parallel resonant frequency calculation formula (3), it can be known that C L The change can compensate for the resonant frequency of the crystal.
[0063]
[0064]
[0065] Where ω s Not included in C0 and C L The series resonant frequency, ω N To incorporate C0 and C L The parallel resonant frequency at time. L1 is the dynamic equivalent series inductance, C1 is the dynamic equivalent series capacitance, C0 is the static capacitance, R is the dynamic equivalent series resistance, and C... L This is the equivalent load capacitance of the crystal in the crystal oscillator.
[0066] Based on this, the inventors propose a crystal oscillator resonant frequency adjustment technology: A linear current whose magnitude changes linearly with temperature and multiple exponential currents whose magnitudes change exponentially with temperature are provided. The linear current and the multiple exponential currents are superimposed and summed to convert them into a temperature compensation voltage output. This temperature compensation voltage is applied to the control terminal of a varactor diode connected to both ends of the crystal oscillator. The shape of the temperature compensation voltage curve is adjusted by regulating the curves of the linear current and the multiple exponential currents with temperature. The equivalent load capacitance of the crystal in the crystal oscillator is adjusted by regulating the capacitance value of the varactor diode to compensate for the temperature drift of the crystal resonant frequency. The closer the shape of the temperature compensation voltage curve is to the temperature drift curve of the crystal resonant frequency, the higher the temperature drift compensation accuracy of the crystal resonant frequency. A capacitor array is connected to both ends of the oscillator, and the capacitance value of the capacitor array connected to the voltage-controlled oscillator is adjusted to regulate the room-temperature resonant frequency of the crystal.
[0067] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention.
[0068] Please see Figures 3 to 15It should be noted that the illustrations provided in this embodiment are only schematic representations of the basic concept of the present invention. Therefore, the drawings only show components relevant to the present invention and are not drawn according to the actual number, shape, and size of the components in implementation. In actual implementation, the form, quantity, and proportion of each component can be arbitrarily changed, and the component layout may be more complex. The structures, proportions, sizes, etc., depicted in the accompanying drawings are only for illustrative purposes to aid those skilled in the art and are not intended to limit the implementation conditions of the present invention. Therefore, they have no substantial technical significance. Any modifications to the structure, changes in proportions, or adjustments to size, without affecting the effects and objectives of the present invention, should still fall within the scope of the technical content disclosed in the present invention.
[0069] like Figure 3 or Figure 9 As shown, the present invention provides an arbitrary temperature compensated voltage function generator, which includes:
[0070] The reference voltage generation circuit generates a first reference voltage V with zero temperature coefficient. REF and N second reference voltages V1, V2, ... and V with zero temperature coefficient N ;
[0071] The negative temperature voltage generating circuit generates a first voltage V1 with a negative temperature coefficient.
[0072] A non-inverting amplifier has a first voltage V1 at its non-inverting input terminal and an inverting input terminal connected to its output terminal, and the output terminal outputs a second voltage V2 with a negative temperature coefficient.
[0073] An inverting amplifier has a non-inverting input terminal connected to a first voltage V1, an inverting input terminal connected to a first reference voltage VREF, and an output terminal that outputs a third voltage V3 with a positive temperature coefficient.
[0074] N exponential current generators, namely exponential current generator 1, exponential current generator 2, ... and exponential current generator N, are arranged in parallel. The positive temperature voltage input terminals of the N exponential current generators are respectively connected to a third voltage V3, and the negative temperature voltage input terminals of the N exponential current generators are respectively connected to a second voltage V2. The constant temperature voltage input terminals of the N exponential current generators are connected one-to-one with N second reference voltages, that is, the constant temperature voltage input terminal of exponential current generator 1 is connected to the second reference voltage V1, the constant temperature voltage input terminal of exponential current generator 2 is connected to the second reference voltage V2, ..., the constant temperature voltage input terminal of exponential current generator N is connected to the second reference voltage V1. N The output of the exponential current generator is connected to the circuit and outputs an exponential current that varies exponentially with temperature.
[0075] A linear current generator whose input is connected to either a second voltage V2 or a third voltage V3, and whose output is a linear current with a linear temperature coefficient.
[0076] A current mirror, whose current input terminal is simultaneously connected to the source current output terminal of N exponential current generators, and whose current output terminal is simultaneously connected to the leakage current output terminal of N exponential current generators.
[0077] A transimpedance amplifier, whose non-inverting input is connected to the current output of a current mirror and the output of a linear current generator, and whose inverting input is connected to a first reference voltage V. REF Its output terminal outputs a temperature compensation voltage V OUT ;
[0078] Where N is an integer greater than or equal to 2, the exponential current curve of the exponential current generator and the linear current curve of the linear current generator are both adjustable curves. The linear current and N exponential currents are summed by a transimpedance amplifier, and the sum is converted into a temperature-compensated voltage V based on the transimpedance gain of the transimpedance amplifier. OUT The output, by adjusting the curve shapes of the linear current and N exponential currents, can produce a temperature-compensated voltage V with any curve shape. OUT .
[0079] Optionally, such as Figure 3 As shown, the non-inverting amplifier includes a first amplifier A1, which constitutes the most basic non-inverting amplifier. The non-inverting input of the first amplifier A1 is connected to a first voltage V1, and the inverting input of the first amplifier A1 is connected to its output. The output of the first amplifier A1 outputs a second voltage V2. The inverting amplifier includes a first resistor R1, a second resistor R2, and a second amplifier A2, which constitute an inverting amplifier. The non-inverting input of the second amplifier A2 is connected to the first voltage V1 via the first resistor R1 connected in series, and the inverting input of the second amplifier A2 is connected to a first reference voltage V. REF The output terminal of the second amplifier A2 is connected to the non-inverting input terminal of the second amplifier A2 via the second resistor R2 connected in series, and the output terminal of the second amplifier A2 outputs the third voltage V3.
[0080] In detail, such as Figure 3 As shown, the first amplifier A1 constitutes a non-inverting amplifier. The driving capability of the first voltage V1 is improved after being amplified by the non-inverting amplifier, resulting in a second voltage V2 with a negative temperature coefficient. The first resistor R1, the second resistor R2, and the second amplifier A2 constitute an inverting amplifier. The driving capability of the first voltage V1 is improved after being amplified by the inverting amplifier, resulting in a third voltage V3 with a positive temperature coefficient.
[0081] Optionally, such as Figure 4As shown, the exponential current generator i includes a transistor Qi, a first adjustable resistor R3i, a first selection switch K1i, and a second selection switch K2i. The value of i is an integer from 1 to N. The base of transistor Qi serves as the constant-temperature voltage input terminal of the exponential current generator i, and the base of transistor Qi is connected to the second reference voltage V. i The emitter of transistor Qi is connected to the output of the first selector switch K1i via a series adjustable resistor R3i. The first input of the first selector switch K1i serves as the negative temperature voltage input of the exponential current generator i. The first input of the first selector switch K1i is connected to the second voltage V2. The second input of the first selector switch K1i serves as the positive temperature voltage input of the exponential current generator i. The second input of the first selector switch K1i is connected to the third voltage V3. The collector of transistor Qi is connected to the input of the second selector switch K2i. The first output of the second selector switch K2i serves as the source current output of the exponential current generator i. The second output of the second selector switch K2i serves as the leakage current output of the exponential current generator i.
[0082] Both the first selection switch K1i and the second selection switch K2i are single-pole double-throw switches, which can switch between input and output.
[0083] In detail, such as Figure 4 As shown, transistor Qi and the first adjustable resistor R3i constitute a common-base transconductance amplifier with emitter negative feedback. The relationship between the collector output current of transistor Qi and the input voltage VIN is: [The following text appears to be a separate, unrelated section and is not translated:] When V... i -VIN equals the turn-on voltage V of transistor Qi. T At that time, as the starting point of the output current of the exponential current generator i, when V i As the voltage difference at VIN continues to increase, the current rises exponentially, with the slope continuously increasing; and this current curve at V... i As VIN increases further, due to the effect of the first adjustable resistor R3i, the slope approaches a constant, approximately equal to 1 / R3i. When VIN is connected to a negative temperature voltage, due to V... i As the temperature remains constant, the higher the temperature, the smaller VIN becomes. i The larger the voltage difference between -VIN and VIN, the more exponential the current generated by the common-base transconductance amplifier in the high-temperature range; when VIN is connected to a positive temperature voltage, VIN decreases as the temperature decreases. i The larger the voltage difference -VIN, the more exponential the current will be generated in the common-base transconductance amplifier at low temperatures.
[0084] More in detail, such as Figures 3-5 As shown, the first input terminal of the common-base transconductance amplifier is connected to a constant-temperature voltage (i.e., the second reference voltage) V. iThe second input terminal of the common-base transconductance amplifier is selected by the first selection switch K1i to be connected to either a negative temperature voltage (i.e., the second voltage) V2 or a positive temperature voltage (i.e., the third voltage) V3, generating an exponential current in the low / high temperature range. The output terminal of the common-base transconductance amplifier is selected by the second selection switch K2i, which can control the direction of the output current: when the input terminal is a constant temperature voltage V3... i When the input voltage is negative V2, the common-base transconductance amplifier generates an exponential current in the high-temperature range; when the input voltage is constant V... i At a positive temperature voltage V3, the common-base transconductance amplifier generates an exponential current in the low-temperature range; when the output terminal is a source current output terminal, the output current I... OUT The direction of the current flow is outward relative to the transimpedance amplifier. When the output terminal is the leakage current output terminal, the output current I... OUT With the direction of flow relative to the transimpedance amplifier being inward, four basic exponential current curves can be generated at the output of the common-base transconductance amplifier through four connection combinations of the first selection switch K1i and the second selection switch K2i, such as... Figure 5 As shown.
[0085] More specifically, in the exponential current generator i, when the first selection switch K1i is connected to the negative temperature voltage V2 and the second selection switch K2i is connected to the leakage current output terminal, the basic exponential current curve output at the output terminal is as follows: Figure 6 As shown in the figure. Point M1 is the starting point of the exponential current, which is also the starting point of the compensation current, and s is the steady slope of the exponential current, which is also the slope of the compensation current.
[0086] Furthermore, by adjusting the constant temperature voltage V i The magnitude of the value can be adjusted to change the starting point of the compensation current, allowing the starting point to be adjusted to any temperature point. In an optional embodiment of the invention, a 2-bit control code is used to control the constant temperature voltage V. i The voltage value is adjusted to obtain, as shown below. Figure 7 The four sets of different exponential current curve shapes are shown.
[0087] Furthermore, by adjusting the value of the first adjustable resistor R3i, the slope of the compensation current can be changed, forming an exponential current function with an arbitrary compensation current slope. In an optional embodiment of the invention, the resistance value of the first adjustable resistor R3i is adjusted using a 5-bit control code, resulting in 32 different exponential current curve shapes, such as... Figure 8 The figure shows the exponential current curves with four different compensation current slopes.
[0088] Therefore, in the exponential current generator i, by controlling the constant temperature voltage V iBy adjusting the first adjustable resistor R3i, an exponential current function with arbitrary compensation current starting point and arbitrary compensation current slope can be obtained at the output terminal.
[0089] Optionally, such as Figure 3 As shown, the linear current generator includes a third selection switch K3 and a second adjustable resistor R4. The second voltage V2 is connected to the first input terminal of the third selection switch K3, the third voltage V3 is connected to the second input terminal of the third selection switch K3, the output terminal of the third selection switch K3 is connected to one end of the second adjustable resistor R4, and the other end of the second adjustable resistor R4 serves as the output terminal of the linear current generator.
[0090] In detail, such as Figure 3 As shown, when the first input terminal of the third selection switch K3 is connected to its output terminal, that is, when the negative temperature voltage V2 is connected to the second adjustable resistor R4 through the third selection switch K3, a linear current with a positive temperature coefficient is generated at the other end of the second adjustable resistor R4. This linear current passes through the resistor in the transimpedance amplifier and then to ground. When the second input terminal of the third selection switch K3 is connected to its output terminal, that is, when the positive temperature voltage V3 is connected to the second adjustable resistor R4 through the third selection switch K3, a linear current with a negative temperature coefficient is generated at the other end of the second adjustable resistor R4. This current passes through the resistor in the transimpedance amplifier and then to ground.
[0091] The third selection switch K3 is also a single-pole double-throw switch, which can switch the input; adjusting the resistance value of the second adjustable resistor R4 can adjust the slope of the output linear current, which will not be described further here.
[0092] Optionally, such as Figure 3 As shown, the current mirror includes a first PMOS transistor P1 and a second PMOS transistor P2. The source of the first PMOS transistor P1 is connected to the operating voltage VCC, the gate of the first PMOS transistor P1 is connected to the drain of the first PMOS transistor P1, the drain of the first PMOS transistor P1 serves as the current input terminal of the current mirror, and the drain of the first PMOS transistor P1 is connected to the source current output terminal of the exponential current generator. The source of the second PMOS transistor P2 is connected to the operating voltage VCC, the gate of the second PMOS transistor P2 is connected to the gate of the first PMOS transistor P1, the drain of the second PMOS transistor P2 serves as the current output terminal of the current mirror, and the drain of the second PMOS transistor P2 is connected to the drain current output terminal of the exponential current generator.
[0093] In detail, such as Figure 3As shown, the first PMOS transistor P1 and the second PMOS transistor P2 form a current mirror, which copies the exponential current output from the source current output terminal to the input terminal of the transimpedance amplifier. The first PMOS transistor P1 and the second PMOS transistor P2 have the same specifications and the same width-to-length ratio. Furthermore, the current mirror can also be other complex current mirror structures composed of NMOS and PMOS transistors, which are not limited here.
[0094] Optionally, such as Figure 3 As shown, the transimpedance amplifier includes a third amplifier A3 and a third adjustable resistor R5. The non-inverting input of the third amplifier A3 is connected to the drain of the second PMOS transistor P2 and the other end of the second adjustable resistor R4. The inverting input of the third amplifier A3 is connected to the first reference voltage V. REF The output of the third amplifier A3 is connected to the non-inverting input of the third amplifier A3 via a series adjustable resistor R5. The output of the third amplifier A3 outputs a temperature-compensated voltage V. OUT .
[0095] In detail, such as Figure 3 As shown, the third amplifier A3 and the third adjustable resistor R5 constitute a transimpedance amplifier. The non-inverting input of this transimpedance amplifier is connected to N exponential currents via direct or mirror connection. A linear current is also connected to the non-inverting input of this transimpedance amplifier. The transimpedance amplifier sums the linear current and the N exponential currents, and based on the transimpedance gain of the amplifier, converts this sum into a temperature-compensated voltage V. OUT Output. The transimpedance gain of the transimpedance amplifier can be adjusted by the resistance value of the third adjustable resistor R5. Since the curve shapes of both the linear current and the N exponential currents are adjustable, a temperature compensation voltage V of arbitrary curve shape can be obtained by adjusting the curve shapes of the linear current and the N exponential currents. OUT .
[0096] Then, we get as follows Figure 9 The arbitrary temperature-compensated voltage function generator shown can generate a constant-temperature voltage V by adjusting the number N of exponential current generators. i By adjusting the shape of the exponential current function curve using the first adjustable resistor R3i, adjusting the shape of the linear current curve using the second adjustable resistor R4 and the third selection switch K3, and adjusting the transimpedance gain using the third adjustable resistor R5, a temperature-compensated voltage function with an arbitrary curve shape can be obtained after superposition and conversion.
[0097] In an optional embodiment of the present invention, such as Figure 10As shown, N is 3, meaning the arbitrary temperature compensated voltage function generator includes three exponential current generators: the third selection switch K3 is connected to the positive temperature voltage V3, generating a linear current I with a linear negative temperature coefficient at the other end of the second adjustable resistor R4. OUT Linear current I OUT After passing through the third adjustable resistor R5, the current reaches ground; the constant temperature voltage input terminal of the exponential current generator 1 is connected to the second reference voltage V1, and the VIN1 input terminal is connected to the positive temperature voltage V3 via the first selector switch K11. The output terminal is connected to the leakage current output terminal via the second selector switch K21, generating a low-temperature exponential current with the current direction being V. OUT The exponential current generator 2 is connected to ground via the third adjustable resistor R5; its constant temperature voltage input terminal is connected to the second reference voltage V2, and its VIN2 input terminal is connected to the negative temperature voltage V2 via the first selector switch K12. Its output terminal is connected to the source current output terminal via the second selector switch K22, generating a high-temperature exponential current. The current direction is from the second POMS transistor P2 through the third adjustable resistor R5 to V2. OUT Output: The constant temperature voltage input terminal of the exponential current generator 3 is connected to the second reference voltage V3. The VIN3 input terminal is connected to the negative temperature voltage V2 through the first selection switch K13. The output terminal is connected to the source current output terminal through the second selection switch K23, generating a high-temperature exponential current. The current direction is from the second POMS transistor P2 through the third adjustable resistor R5 to V. OUT Output.
[0098] In detail, such as Figure 11 As shown, Figure 10 The graph shows the output voltage (i.e., temperature compensation voltage) function of the arbitrary temperature compensation voltage function generator. The output temperature compensation voltage function is approximately a cubic power function. By adjusting the starting point and slope of the compensation current of the exponential current generator 3, temperature compensation voltage curves of different shapes can be obtained.
[0099] Simultaneously, the inflection points and slopes of exponential currents 1 and 2 can be changed, and the resistance value of the second adjustable resistor R4 can also be changed to obtain voltage waveforms that approximate a cubic power function. For example... Figure 12 As shown, this is for adjustment Figure 10 When the resistance value of the second adjustable resistor R4 of the arbitrary temperature compensation voltage function generator is changed, four types of temperature compensation voltage function waveforms are obtained; by changing the number of bits of the corresponding control code, multiple sets of curve shapes can be obtained, such as 32 sets of curve shapes corresponding to a 5-bit control code.
[0100] like Figure 13 As shown, this is for adjustment. Figure 10By adjusting the resistance value of the third adjustable resistor R5 in the arbitrary temperature compensation voltage function generator, four temperature compensation voltage function waveforms were obtained. By changing the number of bits in the corresponding control code, multiple sets of curve shapes can be obtained, such as 64 sets of curve shapes corresponding to a 6-bit control code.
[0101] Combination Figure 1 The temperature drift curve shape change caused by the deviation in the cutting angle of the AT-cut quartz crystal is shown below, and... Figures 11-13 The arbitrary temperature-compensated voltage function generator shown can output different voltage functions by configuring the number N of exponential current generators and the isothermal voltage V input to the exponential current generators. i The connection of the voltage value, the resistance value of the first adjustable resistor R3i, the first selection switch K1i and the second selection switch K2i can generate a temperature compensation voltage function with an arbitrary curve shape. Through this temperature compensation voltage function, the inherent temperature drift curve of the AT-cut quartz crystal can be infinitely approximated, and the crystal can be subjected to high-precision temperature compensation, thereby improving the compensation accuracy.
[0102] The larger the value of N, the closer the temperature compensation voltage function generated by any temperature compensation voltage function generator can be to the inherent cubic power function temperature drift curve of the AT-cut quartz crystal. Furthermore, the shape of the temperature compensation voltage function can be arbitrarily adjusted according to the deviation of the cutting angle, and the temperature drift of the resonant frequency of the crystal oscillator after compensation can be less than 1ppm.
[0103] In another optional embodiment of the present invention, N is 4, that is, the arbitrary temperature compensation voltage function generator includes 4 exponential current generators, and the corresponding temperature compensation voltage function is as follows: Figure 14 As shown, it will not be described again here.
[0104] Based on this, such as Figure 15 As shown, the present invention also provides a high-precision analog temperature-compensated crystal oscillator, which includes:
[0105] Crystals produce stable frequency oscillations;
[0106] A voltage-controlled oscillator has its input terminal connected to one end of the crystal, XTAL1, and its output terminal connected to the other end of the crystal, XTAL2. It provides negative impedance to the crystal, enabling the crystal to start oscillating and stabilize.
[0107] The output drive circuit has its input terminal connected to the output terminal of the voltage-controlled oscillator and its output terminal connected to an external load to drive the external load.
[0108] The first varactor diode has its cathode connected to the input terminal of the voltage-controlled oscillator and its anode grounded.
[0109] The second varactor diode has its cathode connected to the output terminal of the voltage-controlled oscillator and its anode grounded.
[0110] The above-mentioned arbitrary temperature compensation voltage function generator produces temperature compensation voltages with arbitrary curve shapes;
[0111] The noise filter has its input terminal connected to the output terminal of an arbitrary temperature compensation voltage function generator, and its output terminal connected to the control terminal of the first varactor diode and the control terminal of the second varactor diode, to filter out high-frequency noise of the temperature compensation voltage.
[0112] The erasable and rewritable non-volatile memory MTP has its output connected to an arbitrary temperature compensation voltage function generator. It provides control codes to the arbitrary temperature compensation voltage function generator to adjust the curve shape of the temperature compensation voltage. Based on the adjustment of the temperature compensation voltage, the capacitance values of the first varactor diode and the second varactor diode are adjusted, thereby adjusting the equivalent load capacitance of the crystal to compensate for the temperature drift of the crystal resonant frequency.
[0113] The erasable and rewritable non-volatile memory MTP is connected to the reference voltage generation circuit, the first adjustable resistor R3i, the first selection switch K1i, the second selection switch K2i, the third selection switch K3, the second adjustable resistor R4, and the third adjustable resistor R5, respectively, and outputs a multi-bit control code to adjust and control the temperature compensation voltage waveform output by the arbitrary temperature compensation voltage function generator.
[0114] In detail, by controlling the arbitrary temperature compensation voltage function generator through the erasable and rewritable non-volatile memory MTP, a temperature compensation voltage waveform that infinitely approximates the inherent cubic power function temperature drift curve of the AT-cut quartz crystal is obtained. Based on this temperature compensation voltage, the equivalent load capacitance of the crystal is controlled, thereby offsetting the temperature drift of the crystal's resonant frequency.
[0115] Optionally, such as Figure 15 As shown, the high-precision analog temperature-compensated crystal oscillator further includes:
[0116] The first capacitor array has one end connected to the input terminal of the voltage-controlled oscillator and the other end grounded. The control terminal is connected to the output terminal of the erasable and rewritable non-volatile memory MTP.
[0117] The second capacitor array has one end connected to the output of the voltage-controlled oscillator and the other end grounded. The control terminal is connected to the output of the erasable and rewritable non-volatile memory (MTP).
[0118] Among them, the erasable and rewritable non-volatile memory MTP provides control codes for the first capacitor array and the second capacitor array, respectively, to adjust the capacitance value of the first capacitor array connected to the voltage-controlled oscillator and the capacitance value of the second capacitor array connected to the voltage-controlled oscillator, thereby adjusting the room temperature resonant frequency of the crystal.
[0119] In an optional embodiment of the present invention, the control codes for the erasable non-volatile memory MTP connected to the first capacitor array and the second capacitor array are each 6 bits long, and the first and second capacitor arrays contain 64 minimum unit capacitors. The number of bits in the control codes of the capacitor arrays, as well as the capacitance value and number of the minimum unit capacitors, can be adjusted according to actual needs. The more bits in the control codes, the more minimum unit capacitors are correspondingly present, resulting in a smaller adjustment step for the crystal's room-temperature resonant frequency and higher precision.
[0120] Furthermore, based on the design concept of the arbitrary temperature compensated voltage function generator and the high-precision analog temperature compensated crystal oscillator described above, this invention also provides a method for adjusting the resonant frequency of a crystal oscillator, which includes the following steps:
[0121] S1. Provide a linear current whose magnitude changes linearly with temperature and N exponential currents whose magnitude changes exponentially with temperature. The curves of the linear current changing with temperature and the curves of the exponential current changing with temperature are both adjustable curves, and N is an integer greater than or equal to 2.
[0122] S2. Summate the linear current and N exponential currents, and convert the sum of currents into a temperature-compensated voltage output.
[0123] S3. Apply the temperature compensation voltage to the control terminals of the two varactor diodes;
[0124] S4. In crystal oscillation, a varactor diode is connected to each end of the voltage-controlled oscillator. One end of one varactor diode is grounded and the other end is connected to the input terminal of the voltage-controlled oscillator. One end of the other varactor diode is grounded and the other end is connected to the output terminal of the voltage-controlled oscillator.
[0125] S5. By adjusting the curve shapes of the linear current versus temperature curve and the N exponential current versus temperature curves, a temperature compensation voltage with an arbitrary curve shape is obtained, thereby controlling the capacitance value of the two varactor diodes, and further controlling the equivalent load capacitance of the crystal in the crystal oscillator to compensate for the temperature drift of the crystal resonant frequency.
[0126] Optionally, before compensating for the temperature drift of the crystal resonant frequency, the method for adjusting the resonant frequency of the crystal oscillator further includes the step of:
[0127] Stp1. Connect a capacitor array to each end of the voltage-controlled oscillator. Connect one end of one capacitor array to the input terminal of the voltage-controlled oscillator and the other end to ground. Connect one end of the other capacitor array to the output terminal of the voltage-controlled oscillator and the other end to ground.
[0128] Stp2: Adjust the capacitance values of the two capacitor arrays connected to the voltage-controlled oscillator, thereby adjusting the room-temperature resonant frequency of the crystal.
[0129] In summary, the arbitrary temperature-compensated voltage function generator, high-precision analog temperature-compensated crystal oscillator, and crystal oscillator resonant frequency adjustment method provided by this invention can obtain a temperature-compensated voltage of arbitrary curve shape by superimposing and summing the linear current and N exponential currents and converting the current to voltage. This temperature-compensated voltage is then fed back onto the voltage-controlled terminal of the varactor diode in the voltage-controlled oscillator of the crystal oscillator, thereby regulating the equivalent load capacitance of the crystal in the crystal oscillator and effectively compensating for the temperature drift of the crystal resonant frequency. Simultaneously, by adjusting the curve shape of the linear current and the N exponential currents, the curve shape of the temperature-compensated voltage is adjusted, making the curve shape of the temperature-compensated voltage infinitely close to the temperature drift curve of the crystal resonant frequency, effectively improving the temperature drift compensation accuracy of the crystal resonant frequency. Furthermore, by adjusting the capacitance value of the capacitor array connected to both ends of the voltage-controlled oscillator, the room-temperature resonant frequency of the crystal can be adjusted.
[0130] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in the present invention should still be covered by the claims of the present invention.
Claims
1. An arbitrary temperature-compensated voltage function generator, characterized by, include: A reference voltage generation circuit generates a first reference voltage with zero temperature coefficient and N second reference voltages with zero temperature coefficient. A negative temperature voltage generating circuit generates a first voltage with a negative temperature coefficient. The non-inverting amplifier has its non-inverting input terminal connected to the first voltage, its inverting input terminal connected to its output terminal, and its output terminal outputting a second voltage with a negative temperature coefficient. An inverting amplifier, whose non-inverting input is connected to the first voltage, whose inverting input is connected to the first reference voltage, and whose output output is a third voltage with a positive temperature coefficient; N exponential current generators are arranged in parallel. The positive temperature voltage input terminals of the N exponential current generators are respectively connected to the third voltage, the negative temperature voltage input terminals of the N exponential current generators are respectively connected to the second voltage, the constant temperature voltage input terminals of the N exponential current generators are connected to the N second reference voltages one by one, and the output terminals of the exponential current generators output an exponential current that changes exponentially with temperature. A linear current generator, whose input is connected to either the second voltage or the third voltage, and whose output is a linear current with a linear temperature coefficient; A current mirror, whose current input terminal is simultaneously connected to the source current output terminals of N exponential current generators, and whose current output terminal is simultaneously connected to the leakage current output terminals of N exponential current generators. A transimpedance amplifier, whose non-inverting input is connected to the current output of the current mirror and the output of the linear current generator, whose inverting input is connected to the first reference voltage, and whose output outputs a temperature compensation voltage. Wherein, N is an integer greater than or equal to 2. The exponential current curve of the exponential current generator and the linear current curve of the linear current generator are both adjustable curves. The linear current and N exponential currents are summed by the transimpedance amplifier, and the sum of the currents is converted into the temperature compensation voltage output based on the transimpedance gain of the transimpedance amplifier. By adjusting the curve shape of the linear current and the N exponential currents, the temperature compensation voltage with any curve shape can be obtained.
2. The arbitrary temperature-compensated voltage function generator of claim 1, wherein, The non-inverting amplifier includes a first amplifier, the non-inverting input of which is connected to the first voltage, the inverting input of which is connected to the output of which is the second voltage; the inverting amplifier includes a first resistor, a second resistor, and a second amplifier, the non-inverting input of which is connected to the first voltage via the first resistor in series, the inverting input of which is connected to the first reference voltage, the output of which is connected to the non-inverting input of which is connected via the second resistor in series, and the third voltage.
3. The arbitrary temperature compensated voltage function generator according to claim 1 or 2, characterized in that, The exponential current generator includes a transistor, a first adjustable resistor, a first selection switch, and a second selection switch. The base of the transistor serves as the constant-temperature voltage input terminal of the exponential current generator and is connected to the second reference voltage. The emitter of the transistor is connected to the output terminal of the first selection switch via the first adjustable resistor in series. The first input terminal of the first selection switch serves as the negative-temperature voltage input terminal of the exponential current generator and is connected to the second voltage. The second input terminal of the first selection switch serves as the positive-temperature voltage input terminal of the exponential current generator and is connected to the third voltage. The collector of the transistor is connected to the input terminal of the second selection switch. The first output terminal of the second selection switch serves as the source current output terminal of the exponential current generator and the second output terminal of the second selection switch serves as the leakage current output terminal of the exponential current generator.
4. The arbitrary temperature-compensated voltage function generator of claim 3, wherein, The linear current generator includes a third selector switch and a second adjustable resistor. The second voltage is connected to the first input terminal of the third selector switch, the third voltage is connected to the second input terminal of the third selector switch, the output terminal of the third selector switch is connected to one end of the second adjustable resistor, and the other end of the second adjustable resistor serves as the output terminal of the linear current generator.
5. The arbitrary temperature-compensated voltage function generator of claim 4, wherein, The current mirror includes a first PMOS transistor and a second PMOS transistor. The source of the first PMOS transistor is connected to the operating voltage, and the gate of the first PMOS transistor is connected to the drain of the first PMOS transistor. The drain of the first PMOS transistor serves as the current input terminal of the current mirror and is connected to the source current output terminal of the exponential current generator. The source of the second PMOS transistor is connected to the operating voltage, and the gate of the second PMOS transistor is connected to the gate of the first PMOS transistor. The drain of the second PMOS transistor serves as the current output terminal of the current mirror and is connected to the drain current output terminal of the exponential current generator.
6. The arbitrary temperature-compensated voltage function generator of claim 5, wherein, The transimpedance amplifier includes a third amplifier and a third adjustable resistor. The non-inverting input of the third amplifier is connected to the drain of the second PMOS transistor and the other end of the second adjustable resistor. The inverting input of the third amplifier is connected to the first reference voltage. The output of the third amplifier is connected to the non-inverting input of the third amplifier via the third adjustable resistor connected in series. The output of the third amplifier outputs the temperature compensation voltage.
7. A high precision analog temperature compensated crystal oscillator, characterized by include: Crystals produce stable frequency oscillations; A voltage-controlled oscillator, whose input terminal is connected to one end of the crystal and whose output terminal is connected to the other end of the crystal, provides negative impedance to the crystal, enabling the crystal to start oscillating and oscillate stably; An output drive circuit has its input terminal connected to the output terminal of the voltage-controlled oscillator and its output terminal connected to an external load to drive the external load. The first varactor diode has its cathode connected to the input terminal of the voltage-controlled oscillator and its anode grounded. The second varactor diode has its cathode connected to the output terminal of the voltage-controlled oscillator and its anode grounded. The arbitrary temperature compensation voltage function generator according to any one of claims 1-6 generates a temperature compensation voltage with an arbitrary curve shape; A noise filter, whose input is connected to the output of the arbitrary temperature compensation voltage function generator, and whose output is simultaneously connected to the control terminals of the first varactor diode and the second varactor diode, filters out high-frequency noise from the temperature compensation voltage. The erasable and rewritable non-volatile memory has its output connected to the arbitrary temperature compensation voltage function generator. It provides control codes to the arbitrary temperature compensation voltage function generator to adjust the curve shape of the temperature compensation voltage. Based on the adjustment of the temperature compensation voltage, it adjusts the capacitance values of the first varactor diode and the second varactor diode, thereby adjusting the equivalent load capacitance of the crystal to compensate for the temperature drift of the crystal's resonant frequency.
8. The high precision analog temperature compensated crystal oscillator according to claim 7, characterized in that, The high-precision analog temperature-compensated crystal oscillator also includes: The first capacitor array has one end connected to the input terminal of the voltage-controlled oscillator and the other end grounded, and the control terminal connected to the output terminal of the erasable and rewritable non-volatile memory. The second capacitor array has one end connected to the output terminal of the voltage-controlled oscillator and the other end grounded, and the control terminal connected to the output terminal of the erasable and rewritable non-volatile memory. The erasable non-volatile memory provides control codes for the first capacitor array and the second capacitor array, respectively, to adjust the capacitance value of the first capacitor array connected to the voltage-controlled oscillator and the capacitance value of the second capacitor array connected to the voltage-controlled oscillator, thereby adjusting the room-temperature resonant frequency of the crystal.
9. A method of adjusting the resonant frequency of a crystal oscillator, characterized by, The crystal oscillator includes: a crystal that generates stable frequency oscillations; A voltage-controlled oscillator, whose input terminal is connected to one end of the crystal and whose output terminal is connected to the other end of the crystal, provides negative impedance to the crystal, enabling the crystal to start oscillating and oscillate stably; An output drive circuit has its input terminal connected to the output terminal of the voltage-controlled oscillator and its output terminal connected to an external load to drive the external load. The first varactor diode has its cathode connected to the input terminal of the voltage-controlled oscillator and its anode grounded. The second varactor diode has its cathode connected to the output terminal of the voltage-controlled oscillator and its anode grounded. Based on the arbitrary temperature compensation voltage function generator, generate a temperature compensation voltage with an arbitrary curve shape; A noise filter, whose input is connected to the output of the arbitrary temperature compensation voltage function generator, and whose output is simultaneously connected to the control terminals of the first varactor diode and the second varactor diode, filters out high-frequency noise from the temperature compensation voltage. The erasable and rewritable non-volatile memory has its output terminal connected to the arbitrary temperature compensation voltage function generator. It provides control codes to the arbitrary temperature compensation voltage function generator to adjust the curve shape of the temperature compensation voltage. Based on the adjustment of the temperature compensation voltage, it adjusts the capacitance values of the first varactor diode and the second varactor diode, thereby adjusting the equivalent load capacitance of the crystal to compensate for the temperature drift of the crystal resonant frequency. The arbitrary temperature compensated voltage function generator includes: a reference voltage generation circuit that generates a first reference voltage with zero temperature coefficient and N second reference voltages with zero temperature coefficient; A negative temperature voltage generating circuit generates a first voltage with a negative temperature coefficient. The non-inverting amplifier has its non-inverting input terminal connected to the first voltage, its inverting input terminal connected to its output terminal, and its output terminal outputting a second voltage with a negative temperature coefficient. An inverting amplifier, whose non-inverting input is connected to the first voltage, whose inverting input is connected to the first reference voltage, and whose output output is a third voltage with a positive temperature coefficient; N exponential current generators are arranged in parallel. The positive temperature voltage input terminals of the N exponential current generators are respectively connected to the third voltage, the negative temperature voltage input terminals of the N exponential current generators are respectively connected to the second voltage, the constant temperature voltage input terminals of the N exponential current generators are connected to the N second reference voltages one by one, and the output terminals of the exponential current generators output an exponential current that changes exponentially with temperature. A linear current generator, whose input is connected to either the second voltage or the third voltage, and whose output is a linear current with a linear temperature coefficient; A current mirror, whose current input terminal is simultaneously connected to the source current output terminals of N exponential current generators, and whose current output terminal is simultaneously connected to the leakage current output terminals of N exponential current generators. A transimpedance amplifier, whose non-inverting input is connected to the current output of the current mirror and the output of the linear current generator, whose inverting input is connected to the first reference voltage, and whose output outputs a temperature compensation voltage. Where N is an integer greater than or equal to 2, the exponential current curve of the exponential current generator and the linear current curve of the linear current generator are both adjustable curves. The linear current and N exponential currents are summed by the transimpedance amplifier, and the sum of the currents is converted into the temperature compensation voltage output based on the transimpedance gain of the transimpedance amplifier. By adjusting the curve shape of the linear current and N exponential currents, the temperature compensation voltage with any curve shape can be obtained. The method includes the following steps: Provides a linear current whose magnitude changes linearly with temperature and N exponential currents whose magnitude changes exponentially with temperature. The curves of the linear current changing with temperature and the curves of the exponential current changing with temperature are both adjustable curves, and N is an integer greater than or equal to 2. The linear current and N exponential currents are summed, and the sum is converted into a temperature-compensated voltage output. The temperature compensation voltage is applied to the control terminals of the two varactor diodes; In the crystal oscillator, a varactor diode is connected to each end of the voltage-controlled oscillator. One end of the varactor diode is grounded and the other end is connected to the input terminal of the voltage-controlled oscillator. One end of the other varactor diode is grounded and the other end is connected to the output terminal of the voltage-controlled oscillator. By adjusting the curve shapes of the linear current versus temperature curve and the N exponential current versus temperature curves, a temperature compensation voltage with an arbitrary curve shape is obtained, thereby controlling the capacitance values of the two varactor diodes, and further controlling the equivalent load capacitance of the crystal in the crystal oscillator to compensate for the temperature drift of the crystal resonant frequency.
10. The method of claim 9, wherein the step of adjusting the resonant frequency of the crystal oscillator is performed by: The method for adjusting the resonant frequency of the crystal oscillator further includes the following steps: A capacitor array is connected to each end of the voltage-controlled oscillator. One end of the capacitor array is connected to the input terminal of the voltage-controlled oscillator and the other end is grounded. One end of the other capacitor array is connected to the output terminal of the voltage-controlled oscillator and the other end is grounded. The capacitance values of the two capacitor arrays connected to the voltage-controlled oscillator are adjusted, thereby adjusting the room-temperature resonant frequency of the crystal.