1. Field of the Invention
The invention relates to oscillator circuits, and more particularly to circuits for starting control of crystal oscillator circuits.
2. Description of the Related Art
According to Barkhausen Criteria, two basic conditions are required for oscillation of the crystal oscillator circuit 10. One is a phase shift around the oscillator loop of n*360° degree (n is an integer), and another is an open loop gain thereon greater than 1. Gain stage element 12 provides approximately 180° phase shift from its input terminal XIN and output terminal XOUT. The network formed by crystal Xtal, bias element Rf, and capacitors C1 and C2 provide the additional 180° phase shift. Therefore, an n*360° phase shift around the oscillator loop is obtained. If the magnitude of the open loop gain is greater than 1 and the total phase shift is 360°, the oscillation of the crystal oscillator circuit 10 is achieved.
Conventional crystal oscillator circuits may suffer from long start-up time or lack of precision of frequency. It is difficult to achieve both requirements (short start-up time and precise oscillation frequency). Thus, there is a need for an approach to reducing the start-up time of a quartz-crystal oscillator circuit and obtaining a precise oscillation frequency.
Oscillator circuits are provided. An exemplary embodiment of an oscillator circuit comprises a crystal, a gain stage element coupled between both terminals of the crystal, the gain stage element providing a transconductance for oscillation according to a current provided by a current source, and outputting a periodic signal through an output terminal, a bias element coupled between an input terminal and the output terminal of the gain stage element to bias the gain stage element, a first capacitor network comprising a first switch and a first capacitor coupled to the input terminal of the gain stage element, and a second switch and a second capacitor coupled to the input terminal of the gain stage element, a second capacitor network comprising a third switch and a third capacitor coupled to the output terminal of the gain stage element, and a fourth switch and a fourth capacitor coupled to the output terminal of the gain stage element, and a controller selectively switching the first switch, the second switch, the third switch, and the fourth switch according to the periodic signal.
Another exemplary embodiment of an oscillator circuit comprises a crystal, a gain stage element coupled between both terminals of the crystal, the gain stage element providing a transconductance for oscillation according to a current provided by a current source, and outputting a periodic signal through an output terminal, a bias element coupled between an input terminal and the output terminal of the gain stage element to bias the gain stage element, a first capacitor coupled to the input terminal of the gain stage element, a second capacitor coupled to the output terminal of the gain stage element, and a controller detecting the periodic signal, and adjusting the current when the periodic signal is obtained.
Another exemplary embodiment of an oscillator circuit comprises a crystal, a gain stage element coupled between both terminals of the crystal, the gain stage element providing a transconductance for oscillation according to a current provided by a current source, and outputting a periodic signal through an output terminal, a bias element coupled between an input terminal and the output terminal of the gain stage element to bias the gain stage element, a first capacitor coupled to the input terminal of the gain stage element, a second capacitor coupled to the output terminal of the gain stage element, a first switch and a third capacitor coupled to the input terminal of the gain stage element, a second switch and a fourth capacitor coupled to the output terminal of the gain stage element, and a controller detecting the periodic signal, turning on the first switch and the second switch and adjusting the current when the periodic signal is obtained.
A detailed description is given in the following embodiments with reference to the accompanying drawings.
The invention can be more fully understood by reading the subsequent detailed description and examples with references made to the accompanying drawings, wherein:
The following description is of the best-contemplated mode of carrying out the invention. This description is made for the purpose of illustrating the general principles of the invention and should not be taken in a limiting sense. The scope of the invention is best determined by reference to the appended claims.
Capacitor network Cap1 is connected between input terminal XIN of gain stage element 22 and the ground level, and capacitor network Cap2 is connected between output terminal XOUT of gain stage element 22 and the ground level. Capacitor network Cap1 comprises switches SW1 and capacitors CL1, each connected in serial between input terminal XIN of gain stage element 22 and the ground level. Capacitor network Cap2 comprises switches SW2 and capacitors CL2, each connected in serial between output terminal XOUT of gain stage element 22 and the ground level. In an embodiment, capacitor networks Cap1 and Cap2 can be implemented inside the chip for easy adjustment by controller 28.
Gain stage element 22 outputs periodic signals through output terminal XOUT when oscillation of crystal oscillator circuit 20 is activated. Controller 28 detects the oscillation status of crystal oscillator circuit 20 and outputs bias control signal Ibias-ctrl to control loop gain and capacitance control signal Cap-ctrl to control equivalent capacitance of the circuit. The oscillation status of crystal oscillator circuit 20 is obtained by controller 28 according to the periodic signal received from buffer 26. To ensure the oscillation of crystal oscillator circuit 20, controller 28 outputs bias control signal Ibias-ctrl and capacitance control signal Cap-ctrl when a voltage level of the periodic signal exceeds a predetermined level for a predetermined times in a predetermined period. Specifically, controller 28 may comprise a counter 29 triggered by the periodic signal, and the periodic signal is confirmed when a count value of the counter exceeds a predetermined value.
According to the invention, some of switches SW1 and SW2 are turned off initially, thus the equivalent capacitance of the circuit is low to decrease the start-up period required for activation oscillation. As the oscillation of crystal oscillator circuit 20 is confirmed by controller 28, the equivalent capacitance of the circuit can be increased to obtain more accurate oscillation frequency, 32768 Hz as an example. Thus, controller 28 outputs capacitance control signal Cap-ctrl to turn on the initially turned-off switches to increase the equivalent capacitance of the circuit.
Lower capacitance value and higher gain of the gain stage element 22 can help to achieve a shorter start-up time. However, for saving power, the gain of the gain stage element 22 may initially be set to a lower value as long as the start-up time is acceptable. Once the equivalent capacitance of the circuit is changed, the gain of the gain element 22 can be adjusted by current source 24 to maintain the oscillation of crystal oscillator circuit 20.
While the invention has been described by way of example and in terms of preferred embodiment, it is to be understood that the invention is not limited thereto. Those who are skilled in this technology can still make various alterations and modifications without departing from the scope and spirit of this invention. Therefore, the scope of the present invention shall be defined and protected by the following claims and their equivalents.