CRYSTAL OSCILLATOR

Abstract: A crystal oscillator comprises a cristal 1 and a crystal oscillator circuit 3 for providing an output signal 5. In order to adjust the output frequency, for example during the testing stage of production, a bank of load capacitors C1 to C6 are provided. Each capacitor C1 to C6 may be switched into or out of the circuit by a respective switch 9 to 19. The switches are controlled by control lines D0 to D5, which are set by a 6 bit register 21, known as the trim register. The value in the trim register is set according to the frequency of the output signal. To counteract any swing in the output signal, a bank of current switches T1 to T4 are provided, which enable resistors R1 to R4 to be switched into or out of the circuit. Each resistor R1 to R4 is switched by a respective one of the control lines D2 to D5. Thus, adjusting the load capacitance to obtain a desired frequency causes the oscillator core current to be changed automatically, thereby maintaining a constant swing in the output signal.

Description: CRYSTAL OSCILLATOR Field of the invention The invention relates to a crystal oscillator, and in particular to a circuit and method for adjusting the output frequency of the oscillator without affecting the swing of the output signal. Background to the invention The centre frequency produced by a crystal oscillator may be adjusted by changing or trimming the load capacitance of the crystal . An example of such an oscillator may be found in W098/34338. Trimming the load capacitance in this manner has an adverse effect in that the swing of the output signal is subject to change. To compensate for this change, it is known to use automatic gain control (AGC) to maintain a constant swing of the output frequency. However, using AGC introduces other effects, which may be undesirable, particularly when it is desired to manufacture the oscillator circuit as an integrated circuit . Firstly, additional circuitry is required to provide AGC. This brings additional cost, and perhaps more importantly for portable devices, additional power supply requirements. The extra circuitry required by AGC includes a voltage level detector, a voltage reference, a filter and a comparator. The comparator is provided to compare the reference voltage with the detected level, and adjust the current within the oscillator core accordingly to achieve a constant swing. Secondly, the addition of AGC circuitry forms a feedback loop which means that a settling time is introduced before a given output swing can be relied upon. The aim of the present invention is to provide a trimmable crystal oscillator having a constant swing, but without having the disadvantages mentioned above. Summary of the invention According to a first aspect of the invention, there is provided a crystal oscillator circuit comprising an adjustable load capacitance, and means for controlling the load capacitance to obtain a particular centre frequency, and means for drawing a crystal core current in accordance with the chosen load capacitance. According to another aspect of the present invention, there is provided a method of providing a desired output frequency from a crystal oscillator circuit, the method comprising the steps of adjusting the load capacitance of the crystal oscillator circuit to obtain the desired output frequency, and drawing a crystal core current in accordance with a chosen load capacitance. Brief description of the drawings For a better understanding of the present invention, and to show more clearly how it may be carried into effect, reference will now be made, by way of example, to the accompanying drawings, in which: - Figure 1 shows a crystal oscillator according to the present invention. Detailed description of a preferred embodiment of the invention Figure 1 shows a crystal oscillator according to the present invention. It comprises a crystal 1 and an oscillator circuit 3 for providing an output signal 5. The oscillation circuit is advantageously formed as an integrated circuit . A description of the known components of the oscillator circuit 3 will first be given. The basic oscillating circuit is formed around crystal 1 which is connected across the base and collector of a transistor Ql . A load capacitance Cmin is connected in parallel with the crystal 1, and a current source is provided by Q2 and resistor Rmin. As is well known in the art, Q3 is provided to form a differential amplifier circuit. Instead of taking the output signal directly from the collectors of Ql and Q3, a second differential pair Q4, Q5 is provided. Q4 has its base biased to the same voltage as that of Q3, that is, fixed at a predetermined voltage via decoupling capacitor 31 and resistor 33 by a bias voltage V bias . Q5 has its base biased to the same voltage as that of Ql . The provision of the second differential pair means that the oscillator circuit (based around Ql) is not loaded by the output, since the output signal is taken across the collectors of Q4 and Q5 respectively, and is further limited by comparator 29 to provide a standard CMOS clock signal (clk-out) . In order to adjust the output frequency, the oscillating circuit 3 has a bank of load capacitors Cl to C6. Each capacitor Cl to C6 may be connected in parallel with Cmin by closing pairs of respective switches 9 to 19. Each switch pair is controlled by a respective one of a group of control lines DO to D5. The desired output frequency may therefore be selected by selecting the appropriate load capacitance, in a way which is known to the person skilled in the art. According to the invention, to counteract any swing in the output signal, a bank of current switches are provided. Each current switch comprises a resistor Rl to R4 and associated switch Tl to T4 (preferably FETs) . Each current resistor Rl to R4 may be switched into circuit by a respective one of the control lines D2 to D5. Although it is possible to obtain finer correction by having additional resistor values associated with control lines DO and Dl, the resistance values for such fine correction would become physically too large for an integrated circuit application. Therefore, in the preferred embodiment, current resistors controlled by lines DO and Dl have been omitted. Selecting a particular load capacitance using control lines DO to D5 will select a particular value of emitter resistance of the transistor Q2, and hence will cause a different oscillator core current to be selected. The values of the resistors R1-R4 can be selected to produce a core current which thereby compensates for any swing in the oscillator output signal . Control lines DO to D5 are set by a register 21, referred to herein as a "trim" register. The value output on the control lines D0-D5 from the trim register 21 is set by a baseband processor 23 according to the output frequency measured by a frequency measurement device 7. In operation, under nominal conditions the centre or start point for the oscillator is with control line D5 active, and control lines D4 to DO non-active. This means that switches 19a and 19b are closed, thereby connecting C6 in parallel with Cmin across the crystal 1. Furthermore, when control line D5 is active, current switch T4 is turned on, so that resistor R4 is connected in parallel with Rmin, thereby setting the oscillator core current. With these initial start conditions, the output frεquency is measured by the frequency measuring device 7. The frequency measurement may take place, for example, during production testing of the device. If the frequency is not within range, the baseband processor 23 is addressed via bus 25. Depending upon how much the output frequency has to be adjusted, the baseband processor will decide on a new data value to be sent to the 6 bit trim register 21, thereby setting the values DO through D5. The trim value can thus be used to alter which load capacitances Cl to C6 are to be connected in parallel with the crystal 1, and simultaneously adjust the core current by switching in the appropriate current resistor Rl to R4. Changing the load capacitance will alter the output frequency, and in theory attempt to change the swing of the output signal. However, since the trim value will also change the core current, the output swing is maintained constant. The frequency measurement and setting of the trim value may be iterated until the output signal has the desired frequency. The trim value is then permanently held in memory in the baseband processor 23, and recalled to the trim register 21 on power up to ensure the correct frequency for the life of the oscillator. The six bit trim register enables sixty four values of load capacitance to be selected for adjusting the frequency of the oscillator. The invention described above maintains a constant swing at the oscillator output when the load capacitance is changed, and requires less current than prior art devices using AGC. Also, the circuit is simple and requires only the addition of simple current switches in the oscillator core. These features, together with the fact that large capacitors are not needed, mean that less silicon area is required to realise the invention in an integrated circuit. Furthermore, since there is no feedback loop, there is no associated settling time before obtaining a reliable constant swing. Although the trim register 21 has been described as a six bit register, it may be of any size. For example, it may be larger if a greater degree of adjustability is required in the output frequency. Also, although the preferred embodiment has four current resistors R1-R4 for use with six load capacitances C1-C6, the ratio of current resistors to load capacitors may be 1:1, or indeed any other ratio. Furthermore, although the invention has been described in connection with trimming the frequency during production testing, it is also possible that the invention could be used to adjust the frequency during use.

Claims: CLAIMS 1. A crystal oscillator circuit comprising: an adjustable load capacitance, and means for controlling the load capacitance to obtain a particular centre frequency; and, means for drawing a crystal core current in accordance with the chosen load capacitance. 2. A crystal oscillator circuit as claimed in claim 1, wherein the adjustable load capacitance comprises a bank of capacitors, and means for switching the capacitors into or out of the circuit . 3. A crystal oscillator circuit as claimed in claim 2 , wherein each capacitor in the bank may be individually connected or disconnected from the oscillator circuit. 4. A crystal oscillator circuit as claimed in any one of the preceding claims, wherein the means for drawing a crystal core current comprises a bank of resistors, and means for switching the resistors into or out of the circuit . 5. A crystal oscillator circuit as claimed in claim 4, wherein each resistor in the bank may be individually connected or disconnected from the oscillator circuit. 6. A crystal oscillator circuit as claimed in any one of the preceding claims, wherein the means for controlling the load capacitance comprises a plurality of control lines, which determine which capacitors are connected to the oscillating circuit . 7. A crystal oscillator circuit as claimed in claim 6, wherein the control lines also determine which current resistors are connected to the oscillating circuit. 8. A crystal oscillator circuit as claimed in claim 5, wherein the status of the control lines are set by a register containing a binary value, each bit of the binary value representing the status of a respective control line. 9. A crystal oscillator circuit as claimed in claim 8, wherein the binary value is set according to the frequency measured at the output of the oscillator. 10. A method of providing a desired output frequency from a crystal oscillator circuit, the method comprising the steps of adjusting the load capacitance of the crystal oscillator circuit to obtain the desired output frequency, and drawing a crystal core current in accordance with a chosen load capacitance . 11. A method as claimed in claim 10, wherein the load capacitance is adjusted by switching capacitors, from a bank of capacitors, into cr out of the circuit . 12. A method as claimed in claim 11, wherein each capacitor in the bank may be switched individually into or out of the circuit. 13. A method as claimed in any one of claims 10 to 12 , wherein the crystal core current is drawn by switching resistors, from a bank of resistors, into or out of the circuit. 14. A method as claimed in claim 13, wherein each resistor may be switched individually into or out of the circuit. 15. A method as claimed in any one of claims 10 to 14, wherein the capacitors and resistors are switched into or out of the circuit by a plurality of control lines. 16. A method as claimed in claim 15, wherein the status of each control line is set by a register containing a binary value, each bit of the binary value representing the status of a respective control line. 17. A method as claimed in claim 16, wherein the binary value is set according to the frequency measured at the output of the oscillator. 18. A method as claimed in any one of claims 10 to 17, wherein the desired frequency is set during production of the crystal oscillator circuit.

Inventors: CLARKE DAVID, CLARKE, DAVID
Applicants: ERICSSON TELEFON AB L M, TELEFONAKTIEBOLAGET LM ERICSSON
Application year: 2000
Main classification: H03B5
IPC codes: H03B5