Device and method for calibrating output frequency of crystal oscillator based on digital potentiometer
The digital potentiometer realizes frequency calibration of the crystal oscillator without turning on the device, which solves the problems of poor accuracy and low reliability of mechanical potentiometers under high humidity and heat conditions, and achieves high-precision and convenient frequency adjustment and long life equipment reliability.
Patent Information
- Application Number
- CN201711477061.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2017-12-29
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2037-12-29
AI Technical Summary
In the prior art, under high humidity and heat and vibration conditions, it is difficult for mechanical potentiometers to achieve high-precision frequency adjustment, and the equipment needs to be turned on for adjustment, which affects reliability and maintenance efficiency.
Using a crystal oscillator-based output frequency calibration device, it is connected to the external control data interface through a serial data interface, and frequency adjustment is achieved using EEPROM, cursor registers and variable resistors, which supports frequency calibration without turning on the device. .
It improves the accuracy and operational convenience of frequency adjustment, reduces maintenance costs, enhances earthquake resistance and environmental applicability, avoids wear of mechanical terminals, supports more than 1 million adjustments, and improves the reliability of the equipment.
Smart Images

Figure CN107947769B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of electronics and communication technology, and in particular relates to a crystal oscillator output frequency calibration device and method based on a digital potentiometer. Background Art
[0002] With the development of wireless communication technology, especially in the field of satellite communication, the requirements for frequency accuracy are getting higher and higher. In some occasions where the operating frequency accuracy is required to be high, it is necessary to calibrate the operating frequency of the equipment frequently, and the adjustment of the operating frequency of the equipment is ultimately achieved by adjusting the frequency of the crystal oscillator inside the equipment.
[0003] The commonly used method at present is to adjust the frequency by controlling the analog voltage of the crystal oscillator voltage control end through a mechanical potentiometer. When the device needs frequency adjustment, the device or unit must be opened and the resistance of the potentiometer must be manually adjusted to complete it. After that, the potentiometer must be coated and fixed. Its anti-seismic performance is poor and its accuracy is poor, making it difficult to achieve high-precision frequency adjustment; under harsh conditions such as high humidity, heat, and vibration in aircraft and ships, the resistance value changes greatly and has poor adaptability; after multiple adjustments, the mechanical terminals are prone to wear or even damage, affecting the reliability of the equipment. Summary of the invention
[0004] In view of the above problems, the object of the present invention is to provide a crystal oscillator output frequency calibration device and method based on a digital potentiometer, which can adjust the operating frequency of the device through its external data interface without opening the device.
[0005] In order to achieve the above object, the present invention adopts the following technical solution to achieve it.
[0006] Technical solution 1:
[0007] A crystal oscillator output frequency calibration device based on a digital potentiometer, the crystal oscillator output frequency calibration device comprising: a digital potentiometer and a crystal oscillator;
[0008] The digital potentiometer is provided with a serial data interface, an EEPROM (Electrically Erasable Programmable Read-Only Memory), a vernier register, a vernier and a variable resistor;
[0009] The first data I / O terminal on the serial data interface is bidirectionally connected to the external control data interface, the second data I / O terminal on the serial data interface is bidirectionally connected to the data read / write terminal on the EEPROM and the first data I / O terminal on the vernier register respectively, the data I / O terminal on the EEPROM is bidirectionally connected to the second data I / O terminal on the vernier register, the control signal output terminal of the vernier register is connected to one end of the vernier, the other end of the vernier is connected to the control input terminal on the variable resistor, the control output terminal on the variable resistor is connected to the voltage control terminal of the crystal oscillator, one end of the variable resistor is connected to the reference voltage terminal of the crystal oscillator, and the other end of the variable resistor is grounded.
[0010] The characteristics and further improvements of the technical solution 1 of the present invention are:
[0011] (1) The serial data interface is used to obtain a frequency calibration instruction sent by an external control data interface, wherein the frequency calibration instruction represents an instruction sent by an external host computer to calibrate the output frequency of a crystal oscillator, and the frequency calibration instruction at least includes a value of a vernier register, and the value of the vernier register is used to indicate the position of the vernier; the serial data interface is also used to send the value of the vernier register in the frequency calibration instruction to the vernier register;
[0012] The vernier register is used to obtain the value of the vernier register in the frequency calibration instruction and adjust the position of the vernier according to the value of the vernier register;
[0013] The cursor is used to adjust the terminal resistance of the variable resistor;
[0014] The variable resistor is used to output the voltage division value of the terminal resistance to the voltage control terminal of the crystal oscillator;
[0015] The crystal oscillator is used to obtain a corresponding output frequency according to the voltage at the voltage control terminal;
[0016] The EEPROM is used to store the value of the vernier register corresponding to the output frequency.
[0017] (2) A monitoring unit is also provided outside the digital potentiometer, wherein the input end of the monitoring unit is connected to the power supply voltage of the digital potentiometer, and the output end of the monitoring unit is connected to the hardware override preset pin PR of the digital potentiometer;
[0018] When the power supply voltage is higher than a preset voltage threshold, the monitoring unit sets the hardware override preset pin PR to a high level, allowing the digital potentiometer to adjust the output frequency of the crystal oscillator;
[0019] When the power supply voltage is lower than a preset voltage threshold, the monitoring unit sets the hardware override preset pin PR to a low level, and prohibits adjusting the output frequency of the crystal oscillator.
[0020] (3) The digital potentiometer is provided with a write protection pin WP, and the write protection pin WP is set to a low level through a pull-down resistor;
[0021] When a value needs to be written into the EEPROM, the write protection pin WP is pulled to a high level, and after the value writing is completed, the write protection pin WP is pulled to a low level.
[0022] Technical solution 2:
[0023] A method for calibrating the output frequency of a crystal oscillator based on a digital potentiometer, the method being applied to the device for calibrating the output frequency of a crystal oscillator based on a digital potentiometer according to technical solution 1, the method comprising:
[0024] Step 1, the serial data interface obtains a frequency calibration instruction sent by an external control data interface, wherein the frequency calibration instruction represents an instruction sent by an external host computer to calibrate the output frequency of a crystal oscillator, and the frequency calibration instruction at least includes a value of a vernier register, and the value of the vernier register is used to indicate the position of the vernier;
[0025] Step 2, the serial data interface sends the value of the vernier register in the frequency calibration instruction to the vernier register;
[0026] Step 3, the vernier register obtains the value of the vernier register in the frequency calibration instruction, and adjusts the position of the vernier according to the value of the vernier register; thereby adjusting the terminal resistance value of the variable resistor;
[0027] Step 4, the voltage division value of the terminal resistance of the variable resistor is output to the voltage control terminal of the crystal oscillator, so that the crystal oscillator obtains the corresponding output frequency according to the voltage of the voltage control terminal;
[0028] Step 5, when the output frequency meets the preset frequency accuracy, writing the value of the vernier register corresponding to the current output frequency into the EEPROM;
[0029] Otherwise, adjust the value of the cursor register in the instruction for calibrating the output frequency of the crystal oscillator sent by the external host computer until the output frequency of the crystal oscillator meets the preset frequency accuracy.
[0030] The technical solution of the present invention can realize the frequency adjustment function of the equipment without opening the equipment. The operability is good, convenient and fast, and it is easy to maintain in the field without returning to the factory, saving manpower and reducing maintenance costs. At the same time, since the digital potentiometer is an integrated circuit process, the adjustment accuracy is high; it has good moisture and heat resistance, vibration resistance, and impact resistance, and strong environmental applicability; there is no wear of the slider, and it can be adjusted more than 1 million times, which can effectively improve the reliability of the equipment. For equipment with high calibration accuracy or requiring fast power-on, the effect is very obvious. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0032] Figure 1 A schematic diagram of the structure of a crystal oscillator output frequency calibration device based on a digital potentiometer provided in an embodiment of the present invention;
[0033] Figure 2 A schematic flow chart of a method for calibrating a crystal oscillator output frequency based on a digital potentiometer provided in an embodiment of the present invention;
[0034] Figure 3 A schematic diagram of the circuit principle of a digital potentiometer provided in an embodiment of the present invention;
[0035] Figure 4 A software flow chart of a method for calibrating the output frequency of a crystal oscillator based on a digital potentiometer provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0036] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0037] The embodiment of the present invention provides a crystal oscillator output frequency calibration device based on a digital potentiometer, such as Figure 1 As shown, the crystal oscillator output frequency calibration device includes: a digital potentiometer and a crystal oscillator;
[0038] The digital potentiometer is provided with a serial data interface, an EEPROM, a vernier register, a vernier and a variable resistor;
[0039] The first data I / O terminal on the serial data interface is bidirectionally connected to the external control data interface, the second data I / O terminal on the serial data interface is bidirectionally connected to the data read / write terminal on the EEPROM and the first data I / O terminal on the vernier register respectively, the data I / O terminal on the EEPROM is bidirectionally connected to the second data I / O terminal on the vernier register, the control signal output terminal of the vernier register is connected to one end of the vernier, the other end of the vernier is connected to the control input terminal on the variable resistor, the control output terminal on the variable resistor is connected to the voltage control terminal of the crystal oscillator, one end of the variable resistor is connected to the reference voltage terminal of the crystal oscillator, and the other end of the variable resistor is grounded.
[0040] in,
[0041] The serial data interface is used to obtain a frequency calibration instruction sent by an external control data interface, wherein the frequency calibration instruction represents an instruction sent by an external host computer to calibrate the output frequency of a crystal oscillator, and the frequency calibration instruction at least includes a value of a vernier register, and the value of the vernier register is used to indicate the position of the vernier; the serial data interface is also used to send the value of the vernier register in the frequency calibration instruction to the vernier register;
[0042] The vernier register is used to obtain the value of the vernier register in the frequency calibration instruction and adjust the position of the vernier according to the value of the vernier register;
[0043] The cursor is used to adjust the terminal resistance of the variable resistor;
[0044] The variable resistor is used to output the voltage division value of the terminal resistance to the voltage control terminal of the crystal oscillator;
[0045] The crystal oscillator is used to obtain a corresponding output frequency according to the voltage at the voltage control terminal;
[0046] The EEPROM is used to store the value of the vernier register corresponding to the output frequency.
[0047] Furthermore, a monitoring unit is also provided outside the digital potentiometer, the input end of the monitoring unit is connected to the power supply voltage of the digital potentiometer, and the output end of the monitoring unit is connected to the hardware override preset pin PR of the digital potentiometer;
[0048] When the power supply voltage is higher than a preset voltage threshold, the monitoring unit sets the hardware override preset pin PR to a high level, allowing the digital potentiometer to adjust the output frequency of the crystal oscillator;
[0049] When the power supply voltage is lower than a preset voltage threshold, the monitoring unit sets the hardware override preset pin PR to a low level, and prohibits adjusting the output frequency of the crystal oscillator.
[0050] Furthermore, the digital potentiometer is provided with a write protection pin WP, and the write protection pin WP is set to a low level through a pull-down resistor;
[0051] When a value needs to be written into the EEPROM, the write protection pin WP is pulled to a high level, and after the value writing is completed, the write protection pin WP is pulled to a low level.
[0052] The embodiment of the present invention further provides a crystal oscillator output frequency calibration method based on a digital potentiometer, and the method is applied to the crystal oscillator output frequency calibration device based on a digital potentiometer described in the above embodiment. As shown in 2, the crystal oscillator output frequency calibration method includes:
[0053] Step 1, the serial data interface obtains a frequency calibration instruction sent by an external control data interface, wherein the frequency calibration instruction represents an instruction sent by an external host computer to calibrate the output frequency of a crystal oscillator, and the frequency calibration instruction at least includes a value of a vernier register, and the value of the vernier register is used to indicate the position of the vernier;
[0054] Step 2, the serial data interface sends the value of the vernier register in the frequency calibration instruction to the vernier register;
[0055] Step 3, the vernier register obtains the value of the vernier register in the frequency calibration instruction, and adjusts the position of the vernier according to the value of the vernier register; thereby adjusting the terminal resistance value of the variable resistor;
[0056] Step 4, the voltage division value of the terminal resistance of the variable resistor is output to the voltage control terminal of the crystal oscillator, so that the crystal oscillator obtains the corresponding output frequency according to the voltage of the voltage control terminal;
[0057] Step 5, when the output frequency meets the preset frequency accuracy, writing the value of the vernier register corresponding to the current output frequency into the EEPROM;
[0058] Otherwise, adjust the value of the cursor register in the instruction for calibrating the output frequency of the crystal oscillator sent by the external host computer until the output frequency of the crystal oscillator meets the preset frequency accuracy.
[0059] For example, in actual engineering applications, this solution uses a non-volatile, high-precision digital potentiometer inside the device to replace the mechanical potentiometer, and supplies the voltage control pin of the crystal oscillator with the voltage after the resistance division of the digital potentiometer. Then, the output resistance of the potentiometer is changed by changing the position of the digital potentiometer cursor through software. As the output resistance of the potentiometer changes, the control voltage of the crystal oscillator is changed, thereby changing the frequency value of the crystal oscillator output to achieve the purpose of frequency regulation. The calibration instruction sends serial data to the serial data interface of the digital potentiometer through the external program loading or upgrading interface of the device, and the output frequency of the crystal oscillator can be adjusted, thereby realizing the frequency adjustment function of the device without opening the device. Its block diagram is shown as follows. Figure 1 shown.
[0060] First, the hardware circuit is designed. The circuit schematic is as follows: Figure 3 As shown. The digital potentiometer power supply and data control interface are connected accordingly as required. Just pay attention to the data control line needs to be pulled up to prevent interference.
[0061] The voltage control pin voltage of the crystal oscillator is connected to the internal resistor R AW , R WB The voltage division is realized, which determines the frequency adjustment range of the oscillator without adding external resistors, because the resistance error and resistance temperature coefficient characteristics of the digital potentiometer are relatively poor, and adding external resistors will affect its adjustment range.
[0062] The voltage of the oscillator's control voltage range Vctl is calculated by the formula:
[0063]
[0064] Where R AB =R AW +R WB , R WB is the terminal resistance of the potentiometer.
[0065] The adjustment accuracy of the oscillator frequency needs to be calculated through a formula. The control voltage Vctl of the oscillator is a range, with the minimum being Vmin and the maximum being Vmax. Its factory frequency stability β1, reflow soldering stability β2 and annual aging rate β3 together form the maximum deviation range. To ensure that the oscillator can be adjusted through the potentiometer when the maximum frequency deviation occurs, the appropriate potentiometer resolution, that is, the number of adjustment bits of the potentiometer, needs to be selected according to demand.
[0066] The potentiometer resolution selection method is:
[0067] Potentiometer resolution = oscillator maximum offset range / equipment required minimum frequency error requirement;
[0068] However, due to the certain error of the potentiometer, when selecting the resolution of the potentiometer, it is generally recommended to select a potentiometer with twice the resolution according to the above calculation results, so as to ensure the minimum frequency error requirement of the equipment.
[0069] Through the potentiometer control interface, the software controls its internal cursor register to adjust the cursor to the appropriate position, and then writes its data into the internal EEPROM. When the power is turned on again, the internal cursor register of the potentiometer reads the stored data from the EEPROM and sets the potentiometer cursor back to the pre-programmed position.
[0070] When the frequency needs to be readjusted, the data in the internal cursor register of the potentiometer can be read through the potentiometer control port, and then the current cursor data is added or subtracted until the appropriate position is reached. Then, the current modified value is stored in the EEPROM through the write command. The software flow chart is as follows: Figure 4 shown.
[0071] Secondly, in order to avoid erroneous operation of the potentiometer EEPROM value during the use of the equipment, the hardware and software need to be optimized.
[0072] In terms of software, the digital potentiometer has a write protection function. Only when the write protection pin WP becomes high, the EEPROM inside the potentiometer allows its program to be changed. Therefore, under normal circumstances, the WP pin is made low through a pull-down resistor, and when the value in the potentiometer EEPROM needs to be refreshed, the WP pin is pulled high by software to perform the operation. After the operation is completed, the WP pin is pulled low by software.
[0073] In terms of hardware, the digital potentiometer has a hardware override preset pin PR, that is, when PR is high, the internal cursor register of the potentiometer and the current data control pin of the EEPROM are refreshed. The power supply is monitored by the monitoring circuit and then connected to this pin. When the device is undervoltage, the internal cursor register of the potentiometer and the current data of the EEPROM are refreshed, that is, when the device is undervoltage, the adjustment of the crystal oscillator frequency is prohibited, because when the device is undervoltage, some units have already worked abnormally, the operating frequency of the device may be completely inaccurate, and the calibration may be deviated.
[0074] The equipment generally has an external program loading or upgrading interface. When the equipment needs frequency adjustment, it is only necessary to observe the accuracy of the current equipment transmission frequency with the help of the instrument, and send the calibration command to the serial data port of the digital potentiometer through the program loading or upgrading interface to adjust the output frequency of the crystal oscillator, thereby realizing the frequency adjustment function of the equipment without opening the equipment.
[0075] In this solution, you only need to replace the voltage-dividing resistor or mechanical potentiometer of the voltage-controlled pin of the crystal oscillator in the device with a non-volatile digital potentiometer that meets the requirements of the device, and then complete the peripheral hardware circuit design according to the circuit schematic diagram, and finally complete the software configuration of the digital potentiometer according to the software schematic diagram. At the same time, it should be noted that the data communication protocol of the device's external interface and the serial control port of the digital potentiometer must be the same. If they are different, you can select the corresponding chip for protocol conversion.
[0076] During the operation, it is also necessary to pay attention to the fact that the digital potentiometer and power monitoring chip have high requirements for anti-static, and must be picked up with tweezers instead of being touched directly by hand. At the same time, anti-static wrists must be worn to prevent the device from being broken down. When performing reflow soldering, the temperature must be set strictly according to the soldering temperature curve provided by the device to prevent unnecessary damage. When repairing soldering, the soldering iron temperature cannot be too high, and the soldering iron cannot stay on the device pin for too long.
[0077] A person of ordinary skill in the art can understand that all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk, etc., various media that can store program codes.
[0078] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A crystal oscillator output frequency calibration device based on a digital potentiometer, characterized in that: The crystal oscillator output frequency calibration device comprises: a digital potentiometer and a crystal oscillator; The digital potentiometer is provided with a serial data interface, an electrically erasable read-only memory (EEPROM), a vernier register, a vernier and a variable resistor; The first data I / O terminal on the serial data interface is bidirectionally connected to the external control data interface, the second data I / O terminal on the serial data interface is bidirectionally connected to the data read / write terminal on the EEPROM and the first data I / O terminal on the vernier register respectively, the data I / O terminal on the EEPROM is bidirectionally connected to the second data I / O terminal on the vernier register, the control signal output terminal of the vernier register is connected to one end of the vernier, the other end of the vernier is connected to the control input terminal on the variable resistor, the control output terminal on the variable resistor is connected to the voltage control terminal of the crystal oscillator, one end of the variable resistor is connected to the reference voltage terminal of the crystal oscillator, and the other end of the variable resistor is grounded.
2. The crystal oscillator output frequency calibration device based on a digital potentiometer according to claim 1, characterized in that: The serial data interface is used to obtain a frequency calibration instruction sent by an external control data interface, wherein the frequency calibration instruction represents an instruction sent by an external host computer to calibrate the output frequency of a crystal oscillator, and the frequency calibration instruction at least includes a value of a vernier register, and the value of the vernier register is used to indicate the position of the vernier; the serial data interface is also used to send the value of the vernier register in the frequency calibration instruction to the vernier register; The vernier register is used to obtain the value of the vernier register in the frequency calibration instruction and adjust the position of the vernier according to the value of the vernier register; The cursor is used to adjust the terminal resistance of the variable resistor; The variable resistor is used to output the voltage division value of the terminal resistance to the voltage control terminal of the crystal oscillator; The crystal oscillator is used to obtain a corresponding output frequency according to the voltage at the voltage control terminal; The EEPROM is used to store the value of the vernier register corresponding to the output frequency.
3. The crystal oscillator output frequency calibration device based on a digital potentiometer according to claim 1, characterized in that: A monitoring unit is also provided outside the digital potentiometer, the input end of the monitoring unit is connected to the power supply voltage of the digital potentiometer, and the output end of the monitoring unit is connected to the hardware coverage preset pin PR of the digital potentiometer; When the power supply voltage is higher than a preset voltage threshold, the monitoring unit sets the hardware override preset pin PR to a high level, allowing the digital potentiometer to adjust the output frequency of the crystal oscillator; When the power supply voltage is lower than a preset voltage threshold, the monitoring unit sets the hardware override preset pin PR to a low level, and prohibits adjusting the output frequency of the crystal oscillator.
4. The crystal oscillator output frequency calibration device based on a digital potentiometer according to claim 1, characterized in that: The digital potentiometer is provided with a write protection pin WP, and the write protection pin WP is set to a low level through a pull-down resistor; When a value needs to be written into the EEPROM, the write protection pin WP is pulled to a high level, and after the value writing is completed, the write protection pin WP is pulled to a low level.
5. A method for calibrating the output frequency of a crystal oscillator based on a digital potentiometer, the method being applied to the device for calibrating the output frequency of a crystal oscillator based on a digital potentiometer as claimed in claim 1, characterized in that: The crystal oscillator output frequency calibration method comprises: Step 1, the serial data interface obtains a frequency calibration instruction sent by an external control data interface, wherein the frequency calibration instruction represents an instruction sent by an external host computer to calibrate the output frequency of a crystal oscillator, and the frequency calibration instruction at least includes a value of a vernier register, and the value of the vernier register is used to indicate the position of the vernier; Step 2, the serial data interface sends the value of the vernier register in the frequency calibration instruction to the vernier register; Step 3, the vernier register obtains the value of the vernier register in the frequency calibration instruction, and adjusts the position of the vernier according to the value of the vernier register; thereby adjusting the terminal resistance value of the variable resistor; Step 4, the voltage division value of the terminal resistance of the variable resistor is output to the voltage control terminal of the crystal oscillator, so that the crystal oscillator obtains the corresponding output frequency according to the voltage of the voltage control terminal; Step 5, when the output frequency meets the preset frequency accuracy, writing the value of the vernier register corresponding to the current output frequency into the EEPROM; Otherwise, adjust the value of the cursor register in the instruction for calibrating the output frequency of the crystal oscillator sent by the external host computer until the output frequency of the crystal oscillator meets the preset frequency accuracy.
Citation Information
Patent Citations
On-chip RC oscillator with frequency self correction function and frequency self correction method
CN103873048A
Automatic calibration method for frequency of crystal oscillator
CN104639161A
Device for regulating frequency of crystal oscillator in remote controlling way
CN201374688Y
Crystal oscillator output frequence calibrating device based on digital potentiometer
CN207706147U