Baixe o app para aproveitar ainda mais
Prévia do material em texto
IEEE TRANSACTIONS ON ULTRASONICS, FERROELECTRICS, AND FREQUENCY CONTROL, VOL. 42, NO. 4, JULY 1995 509 The Design of a Microcontroller Temperature Compensated Crystal Oscillator ( CTCXO) and Automatic Compensation Line Dejan Habić, Aleksandra Pavasović, and Dragan Vasiljević Abstract— A new concept in the design of the compensa- tion circuit in microcontroller temperature compensated crystal oscillators (�CTCXO) and the corresponding production line (ACL—automatic compensation line) for fully automatic oscil- lator calibration are presented. The communications ability of �CTCXO is introduced to provide automatic calibration. The shortened successive approxi- mation calibration algorithm gives a short calibration time and a reliable convergence of oscillator adjustment by the ACL system. The �CTCXO is realized as a low-cost device encapsulated in a single cubic inch volume. The �0.5 ppm frequency accuracy in the �40�C/+85�C temperature range is obtained by a 9-bit A/D converter, 10-bit D/A and 512 bytes of software placed in an EEPROM. The ACL system, in addition to the standard laboratory fre- quency counter, temperature chamber and a PC host computer, requires only two additional boards: an analog multiplexer board and an interface board. During production and recalibration, the ACL system can compensate many oscillators simultaneously in a single temperature run, without requiring component selection and human supervision. I. INTRODUCTION IN ANALOG temperature compensated crystal oscillators(TCXO), a varactor provides frequency pulling to reduce oscillator frequency versus temperature drift. A temperature sensing compensation network is used to generate the varactor voltage. Compensation network adjustment requires three to five temperature cycles, depending on frequency stability. In order to accelerate production, computer aided methods may be used in the selection process of compensation network elements [1], [2]. Advances in integrated circuit technology introduced digital temperature compensation techniques (DTCXO). In compari- son to analog TCXOs, they provide higher accuracy for wide temperature ranges, and simplify the adjustment procedure resulting in a smaller number of required temperature cycles. The initial DTCXO solutions were based on a look-up table saved in a nonvolatile memory incorporated in the compensation circuit [3]–[6]. An almost linear temperature sensor generates a voltage that is applied to an A/D converter. The A/D output is used as the memory address. The selected memory location content corresponds to the varactor voltage necessary to compensate oscillator frequency drift [1], [2]. A Manuscript received August 8, 1994; revised December 12, 1994. The authors are with the Faculty of Electrical Engineering, University of Belgrade, Bulevar Revolucije 73, P.O. Box 816, 11 000 Belgrade, Yugoslavia. IEEE Log Number 9411948. D/A converter converts the digital memory content back to the analog varactor voltage. In the microcomputer compensated crystal oscillators (MCXO), a microcomputer is added to the nonvolatile memory, thus improving compensation flexibility. The A/D converter gives temperature in digital form. These data are used by the microcomputer to generate the varactor voltage using a small look-up table and interpolation calculation [7]. A variation of this technique is a dual-mode MCXO [8]–[10] in which the temperature sensing is done by the crystal itself, and the frequency adjustment is based on the direct digital frequency synthesis and not on frequency pulling. The purpose of this paper is to introduce the concept of a microcontroller compensated crystal oscillator ( CTCXO) suitable for fully automated production. The oscillator com- pensation circuit is accomplished by a microcontroller. It is a small, low-power and inexpensive device with many resources and the ability to communicate, which is necessary for oscillator calibration by an automatic compensation line (ACL). The proposed concept provides unsupervised, fully au- tomated temperature compensation of sealed crystal oscillators without component selection in a single temperature run. Many oscillators may be simultaneously calibrated in production or recalibrated for customers. The proposed compensation concept supports both digital compensation approaches: the dual mode MCXO and the classical MCXO with temperature dependent voltage generation for the varactor diode. This paper describes the design of the CTCXO and the ACL system. The design of the CTCXO is elaborated in the second section. The automated production line ACL is presented in the third section. Finally, experimental results are reported in the fourth section. II. DESIGN OF THE CTCXO The CTCXO was designed with the goal of achieving a fully automatic temperature compensation of already sealed units assembled from standard components. The CTCXO block diagram is shown in Fig. 1. The temperature sensor voltage is digitized by an A/D converter. The CPU accepts temperature data, finds the corresponding data from the look-up table formed during calibration, and makes the interpolation to calculate the voltage required at the oscillator’s VCO input to obtain the nominal output frequency. 0885–3010/95$04.00 1995 IEEE Authorized licensed use limited to: UNIVERSIDADE FEDERAL DO RIO GRANDE DO SUL. Downloaded on October 23,2022 at 21:17:33 UTC from IEEE Xplore. Restrictions apply. 510 IEEE TRANSACTIONS ON ULTRASONICS, FERROELECTRICS, AND FREQUENCY CONTROL, VOL. 42, NO. 4, JULY 1995 Fig. 1. �CTCXO block diagram. The voltage is converted back to analog form by a D/A converter. Temperature compensation is achieved by the classical digital compensation method with a minimum number of components. The method is very flexible allowing a wide choice of temperature sensors, control algorithms, components, crystal units, etc. The general purpose 8-bit microcontrollers have all the necessary resources for the realization of the described com- pensation circuit. The CPU provides programmability and calculating power. The look-up table is saved in an EEPROM. Analog quantities are coupled to the microcomputer through A/D and D/A converters. Finally, the microcontroller’s ability to communicate allows calibration of many oscillators by a fully automated ACL line. Oscillator identification is obtained by a hardware key connected to the microcontroller’s digital input port. The hardware key may be a part of the CTCXO itself, or it may correspond to the oscillator socket on the measuring board. The CTCXO has two operating modes: calibration mode and autonomous mode. The autonomous mode is the primary mode of operation and the oscillator is always operated in this mode during normal use. The oscillator is operated in the calibration mode only for temperature compensation while it is inserted in one of the slots of the ACL line. The simple software that controls autonomous operation of the CTCXO includes routines for control of the A/D and D/A subsystems and for search and interpolation of data from the look-up table. Compensation accuracy is determined by the quality of components (A/D, D/A, EEPROM size, crystal hysteresis, etc.). Communication between the CTCXO and the ACL system during calibration is realized through an asynchronous serial interface and is controlled by the ACL calibration software. In order to experimentally test the above concepts and the ACL line, three sample 0.5 CTCXOs have been built. Target frequency stability was ppm in the temperature range from 40 C to 85 C. The design of the CTCXO will be reported through a short description of its building blocks. Voltage Controlled Crystal Oscillator (VCXO) The VCXO part of the CTCXO is a Colpitts oscillator with an AT cut crystal, previously designed for a commercial TCXO, since its characteristics were already perfected for the TCXOs. The crystal unit’s frequency-temperature curve is smooth, otherwise the frequency stability would be de- graded due to interpolation.Its hysteresis is adequately small 0.1 ppm) in comparison with the desired overall frequency stability (0.5 ppm). Oscillation frequency is 8 MHz, the output voltage is HCMOS compatible, and the oscillator power consumption is 9.5 mA at 9 V DC. Care was taken to separate the power lines for the digital part (compensation circuit) and the VCXO part in order to reduce the digital noise affecting the output signal. Both the supply to the oscillator circuit and to the sensor and A/D circuits are filtered. Temperature Sensor The temperature sensor should be small and inexpensive. Temperature precision is not required, but repeatability is. The required temperature sensitivity is determined by the oscillator frequency stability. Linearity is not crucial. Many kinds of commercial temperature sensors more or less satisfy the above stated requirements: platinum (Pt), thermistor (NTC), silicon (Si) and quartz (Xtal) sensors. A silicon sensor was chosen for its small dimensions and low price. Its temperature coefficient is 0.75 C in the temperature range from -55 C to 150 C. Nominal resistance at room temperature is 25 C K Linearity is good, especially if temperatures at the extremes are excluded. The sensitivity of the sensor is increased by using it in a current mode circuit, with a BJT simple current source. Although its current has the same temperature dependence as the transistor base to emitter voltage this temperature dependence is irrelevant, since any current changes with temperature are taken into account during oscillator temperature compensation. For proper operation of the circuit the only relevant parameter is the repeatability of the circuit output with temperature that is achieved with this circuit. The choice of the current value is a compromise between large sensitivity and small dissipation. The value chosen was 1 mA, which results in a variation of circuit output voltage of about 3.75 V, while keeping the dissipation and self-heating of the sensor low (4 mW on the sensor). In order to keep the difference in temperature between the sensor and the crystal to a minimum, they are mounted side by side on the printed circuit board. Unfortunately, the temperature time constant is much smaller for the sensor then for the crystal unit (10 s versus 70 s), affecting the oscillator dynamic stability. Microcontroller Block The microcontroller block is the main part of the CTCXO’s temperature compensation network. Low-cost microcontroller chips are used in order to keep the price of the oscillator low. The microcontroller block performs the A/D and D/A conversion, calibration, and it generates the temperature dependent varactor voltage. The frequency stability of a CTCXO depends mainly on the precision of the A/D and D/A converters. The relative Authorized licensed use limited to: UNIVERSIDADE FEDERAL DO RIO GRANDE DO SUL. Downloaded on October 23,2022 at 21:17:33 UTC from IEEE Xplore. Restrictions apply. HABIĆ et al.: DESIGN OF MICROCONTROLLER TEMPERATURE COMPENSATED CRYSTAL OSCILLATOR AND AUTOMATIC COMPENSATION LINE 511 frequency error due to conversions is [11]: (1) where: is the maximum temperature deviation, i.e. operation temperature range 85 40 125 C); is the maximum slope of the frequency-temperature curve of the crystal (1.8 ppm C); is the number of bits of the A/D converter; is the number of bits of the D/A converter; and is the difference between maximum and min- imum relative crystal frequency in the operating range (50 ppm). The corresponding values for the sample CTCXOs are given in the parenthesis. The first term in (1) is due to A/D conversion, and the second is due to D/A conversion. For wide temperature ranges, the first term is much larger then the second. Thus, the error mostly depends on the choice of the A/D converter. To achieve the desired frequency stability of 0.5 ppm, the A/D converter should be at least 8-bit. The microcontroller CPU’s main duty is the look-up ta- ble search and calculation of the interpolation values. Since any CPU can perform these duties, the simplest (and least expensive) component can be used, that is, an 8-bit CPU is adequate. The only requirements for the CPU are that it should have a timer circuit and the capability of 8-bit multiplication and index table search. The CPU’s speed is not critical, since thermal processes are relatively slow. The size of the EEPROM depends on the size of the look-up table which in turn depends on the compensation algorithm and required oscillator stability. Adequate room should be reserved for the code for the autonomous mode operation, which is also placed in the EEPROM. The Motorola 68HC11, 8-bit microcontroller was used in the sample CTCXOs, since it best satisfies all of the above requirements. EEPROM and RAM are both 512 byte wide. EEPROM programming is software controlled and it is used for storage of the look-up table and autonomous mode code. An eight-bit A/D converter is also a part of the chosen microcontroller. Timer functions are used to generate real time interrupts and impulse waveforms in pulse-width modulation D/A conversion. The dissipation of the entire compensation circuit is 10 mA at 5 V DC. Communication Resources The microcontroller serial communication interface (SCI), a full duplex asynchronous system with ability to be hooked up into a network, is used as the CTCXO’s communication port. The serial interface operates independently of the CPU and can be set into interrupt or polling mode. The communication rate and other communication parameters are software controlled. The serial interface enables linking of many oscillators to a simple serial bus and thus the calibration of many oscillators simultaneously. Fig. 2. ACL system block diagram. The oscillator address is set on one of the input ports (PORT C) of the microcontroller. The addresses are in the range from 0 to 255, enabling the linking of up to 254 oscillators to the bus (Fig. 2). Before each exchange of data between the controller and the oscillator, the addresses are exchanged. The oscillator with the matching address receives the data, the other oscillators wait for the next address. A/D Converter The A/D converter is a ratiometric converter with successive approximation algorithm used for conversion. Adjustment and operation of the A/D conversion are software controlled. The converter can also be turned on and off, which is used to decrease power dissipation. In order to decrease the frequency error due to A/D con- version which would be 0.43 ppm according to (1) for an 8-bit converter, an additional bit of conversion is added by splitting the conversion voltage range into halves using a resistor voltage divider and an analog multiplexer. The highest bit of the 9-bit A/D value is then given by the analog multiplexer control signal value. Since the range of the A/D input voltage is 3.75 V, the frequency error due to A/D conversion is ppm. D/A Converter A PWM (pulse-width modulation) D/A converter has been implemented using two timers for setting the switch-on time and the switch-off time The resultant DC voltage is given by the equation: (2) A ten-bit D/A converter was achieved by programming the 16-bit counters into 10-bit counters. The corresponding frequency error (1) is 0.02 ppm. The period was set to 2 msec to make filtering easier. The output of the PWM D/A converter is fed through a passive RC second order filter with 1Hz cut-off frequency and 40 dB/decade attenuation slope. The filter is terminated by a resistor needed to provide a path to ground for the discharge of the filter capacitors. The maximum voltage at the converter output is 4 V, and the minimum voltage is 0 V. The voltage value at Authorized licensed use limited to: UNIVERSIDADE FEDERAL DO RIO GRANDE DO SUL. Downloaded on October 23,2022 at 21:17:33 UTC from IEEE Xplore. Restrictions apply. 512 IEEE TRANSACTIONS ON ULTRASONICS, FERROELECTRICS, AND FREQUENCY CONTROL, VOL. 42, NO. 4, JULY 1995 the D/A output does notdepend on the CPU frequency and its variations. The Look-up Table The look-up table holds pairs of temperature-voltage values. Temperature is the digitized output of the temperature sensor (voltage or frequency, depending on the sensor type) at a given temperature. Voltage is the digital word that, when presented to the D/A converter input, results in the varactor voltage needed to pull the oscillator frequency back to the nominal value at that temperature point. The look-up table should be as small as possible to save microcontroller nonvolatile memory and calibration time, and large enough to keep the extrapolation error small enough not to degrade the oscillator frequency stability. Taking into account the error due to conversions 0.32 ppm) and the target frequency stability 0.5 ppm), and leaving room for other sources of frequency instabilities, the maximum interpolation error should not be grater then 0.1 ppm [1], [7]. If the interpolation is linear and the frequency-temperature curve of the crystal unit is assumed to be of third order, the maximum interpolation error is [11]: [ppm] (3) where and are the temperatures between which the interpolation is being done, and and are the quadratic and cubic coefficients of the crystal unit frequency-temperature curve, respectively. Using the above equation with worst case crystal coefficients for the used crystal family, and setting 0.1 ppm, a set of 25 temperature values is obtained: It should be noted that is smaller at the ends then in the middle of the temperature range. Since temperature values are 9 bits long and voltage values are 10 bits long, temperature-voltage pairs are three bytes long (8 bits 8 bits 3 bits), resulting in a 75 byte look-up table. It should be noted that the above analysis is true only if the crystal unit’s frequency-temperature curve is ideal (no hysteresis, no discontinuities, no activity dips). The crystal units used in our experiments were high quality crystal units, fabricated for precision TCXOs, with compound unwanted frequency-temperature curve deviations below 0.1 ppm. If lower quality crystal units are used or a higher stability oscillator is required, a higher order A/D converter would be used, for example a 10-bit A/D converter instead of a 8-bit converter. The mircrocontroller family used in sample CTCXOs is now available with a 10-bit A/D converter. If that option is used, with everything else as described earlier, the error due to conversions would be decreased to ppm. The CTCXO Software In order for the CTCXOs to work properly, adequate software had to be developed. The software can be classified by its function into two parts: 1) autonomous operation software, and 2) calibration mode software, that is software that enables communication with the ACL during calibration process. Autonomous Mode Software Since both the program and the look-up table reside in the EEPROM, the program itself can be up to 437 bytes long (512-75). All variables and results of calculations are stored in the RAM. The software enables temperature measuring through a 9- bit A/D converter, interpolation, and forming of the analog voltage by the 10-bit PWM D/A converter. The program starts by initializing all of the microcontroller resources and all of the variables. After initialization, the program cycles indefinitely through a loop in which the following operations are achieved: The A/D converter is turned on and its output acquired and used for finding the two nearest temperature-voltage pairs from the look-up table. The voltage corresponding to the measured temperature is then found by linear interpolation. The A/D converter is turned off. The last operation in the cycle is feeding the calculated voltage value to the input of the PWM D/A converter. The control of the PWM generator is done through two interrupt routines controlled by timers T1 and T2. The routine initiated by T1 sets a high logic level at the PWM generator output and adjusts the contents of the timer T2. The routine initiated by T2 sets a low logic level at the PWM generator output. Timer T3 is used for initiating the interrupt routine for temperature measurement and calculation of the proper volt- age value. The T3 contents are constant, since temperature readings are taken at fixed intervals. Calibration Mode Software The calibration mode software enables temperature measur- ing, generation of the analog value of the control voltage, com- munication with the ACL through the SCI bus and EEPROM programming. The program consists of four interrupt routines. T1 and T2 timer controlled routines are identical to the correspond- ing routines of the autonomous mode software. The routine controlled by timer T3 is somewhat changed: When a 9-bit temperature value is read, it is simply placed into RAM to be sent to the ACL via SCI bus on request. The corresponding varactor voltage is found using a successive approximation procedure described in more detail later. The fourth interrupt routine is used for communication with the ACL and adjustment and calibration of the oscillator. The interrupt request is placed when the CTCXO receives a character through the SCI bus. If the first bit of the 9-bit character is a 0, the character received is data, otherwise it is an address. If an address is received, it is compared to the PORT C value and if the values match, initialization of all variables is done and a reply character is sent. If a data character is received, a check is made to determine whether Authorized licensed use limited to: UNIVERSIDADE FEDERAL DO RIO GRANDE DO SUL. Downloaded on October 23,2022 at 21:17:33 UTC from IEEE Xplore. Restrictions apply. HABIĆ et al.: DESIGN OF MICROCONTROLLER TEMPERATURE COMPENSATED CRYSTAL OSCILLATOR AND AUTOMATIC COMPENSATION LINE 513 the oscillator in question was already addressed, and if yes, how many bytes of data has it already received since last initialization of variables (that is, since last being addressed). If the data character in question is the first byte, then it is received and processed as the first byte of the varactor voltage value and the first byte of temperature value is sent to the ACL via SCI bus. If the data character in question is the second byte, then it is received and processed as the second byte of the varactor voltage value and the CTCXO sends the second byte of temperature value to the ACL via SCI bus. If the data character in question is the third byte, then it is received as the check-sum control byte. The CTCXO checks the received value with the check-sum of previously received bytes. If the values match, the oscillator answers by sending temperature check-sum control byte through the SCI bus to the ACL, otherwise it sends the error character. In either case, annulment of all variables follows. Another branch of the fourth interrupt routine deals with EEPROM programming. If the received byte after the oscil- lator is addressed is an address consisting of all ones FF), then the CTCXO’s CPU starts the EEPROM programming routine and each successively received byte is written into the EEPROM. III. DESIGN OF THE CUSTOMIZED PRODUCTION LINE ACL An automatic line for mass production of precision crystal oscillators should provide: 1) elimination of human influence in the compensation process (reducing price and eliminating possible errors); 2) possibility of compensating many oscillators simultane- ously; 3) elimination of component selection and adjustment of each oscillator before compensation; 4) flexibility 5) possibility of adding gathered data to the data base for future reference 6) possibility of recompensating oscillators without reopen- ing their cases (to correct frequency deviations due to aging, etc.); and 7) ability to handle low-cost oscillators. An example of such a line is shown in Fig. 2. The low-cost oscillators are the oscillators already described in Section II and the ACL is designed for use in their production process. The host computer controlsthe temperature chamber and the frequency counter operation through a standard IEEE 488 bus. The interface board is used as an adapter between the PC computer’s ISA bus and the asynchronous serial bus. Three wire serial bus allows simple handling of a large number of CTCXOs. The intelligent analog multiplexer linked to the same bus provides connection of oscillators signal output to the frequency counter. The ACL calibration software, executed on the host com- puter, controls the communication, calibration and program- ming processes. The ACL operation starts with the host computer download- ing the calibration software to all CTCXO devices simulta- neously. The calibration process itself starts with the host computer setting the temperature of the temperature chamber to the first temperature point through the IEEE488 bus. The tem- perature of the chamber is held constant until the oscillators’ frequencies are stabilized, and the adjustment procedure for each oscillator is successively is performed by the following procedure: The host computer and the CTCXO exchange the identi- fication address. The output signal of the addressed oscillator is then connected to the frequency counter through an analog multiplexer. The host computer receives the temperature sen- sor information from the CTCXO’s A/D converter and sends back a varactor voltage value calculated to pull the oscillator frequency to the nominal value (first iteration). When the oscillator frequency is stabilized, the host computer compares it with the target frequency. If the difference is satisfactorily small, the adjustment is finished. If not, the host computer changes the D/A converter voltage value and the process is continued until the target frequency is achieved (second and further iterations). When all oscillators are adjusted at one temperature point, the host computer defines the new temperature point and the calibration at that temperature is carried out in the same way. The number of temperature points is determined by the uncom- pensated oscillators’ frequency to temperature characteristics and the desired accuracy of compensation, as described earlier. Obviously, the processing time is proportional to the number of temperature points and the number of oscillators. When calibration at all temperature points is finished, the host computer downloads the look-up table contents and the autonomous mode program to the corresponding CTCXO’s EEPROM one by one. The host computer then concludes the adjustment procedure by shutting down all instruments, writing the data gathered during the calibration process to the data- base for future reference, and providing the documentation for each oscillator in a printed form. Two problems had to be solved during the development of the described algorithm. The first problem is the determination of the initial value for the D/A converter in order to obtain the shortest adjustment time through a minimum number of approximation steps in oscillator frequency pulling. The right choice presumes a value as close as possible to the varactor voltage that gives nominal oscillator frequency. The initial value is estimated on the basis of experimentally gathered data for each CTCXO family. These data are placed in the host computer that uses it together with the difference between the measured and the nominal frequency in order to estimate the starting value of the D/A converter input. The second problem is how to select D/A input in the second and further iterations in order to obtain fast convergence of the adjustment procedure. The successive approximation algorithm, common in A/D conversion, is a good choice due to the reliable and fast convergence. The proposed procedure represents a shortened successive approximation algorithm. When many CTCXO devices are calibrated simultane- ously, input to each oscillator’s D/A should be set as soon as a new temperature point is chosen. In this way, all CTCXOs Authorized licensed use limited to: UNIVERSIDADE FEDERAL DO RIO GRANDE DO SUL. Downloaded on October 23,2022 at 21:17:33 UTC from IEEE Xplore. Restrictions apply. 514 IEEE TRANSACTIONS ON ULTRASONICS, FERROELECTRICS, AND FREQUENCY CONTROL, VOL. 42, NO. 4, JULY 1995 Fig. 3. ISI board. will settle their frequencies simultaneously and total adjust- ment time is shortened. The ACL uses standard instruments such as laboratory IEEE 488 bus controlled frequency counter and temperature chamber. Any IBM compatible PC with ISA bus can be used as the host computer (Fig. 2.). Nonstandard elements of the ACL are a specially designed intelligent serial interface (ISI) board and the intelligent analog multiplexer (IAM) board. The ISI board is placed in one of the PC slots. The IAM board is placed inside the temperature chamber, together with the oscillators. The DOS based ACL software is 250 Kbytes long. The description of the nonstandard ACL elements and the ACL software follows. The Intelligent Serial Interface Board The ISI board enables communication through a simple asynchronous serial bus between the PC on one side and the IAM and CTCXOs on the other side (Fig. 2). ISI is designed as a microprocessor system shown in Fig. 3. The microprocessor 68HC811E2 serves as a master on the serial bus (the oscillators and the IAM are the slaves). ISI software (to be described later as a part of the complete ACL software package) is placed into a 2KB EEPROM. RAM is used for temporary placement of calculation variables and data and its size is determined by the number of slaves. For 254 oscillators, 32Kbytes of RAM are sufficient. The CPU SCI communication port is used to link the ISI board to the serial bus. The SCI port is linked to the serial bus through two drivers (74HC541). The exchange of data between the PC and the ISI is done through two latches, one that receives an 8-bit word from the PC which is then read by ISI, and the other for the other direction of data transfer. A hardware interrupt request is placed every time data is placed in a latch. The request is deactivated when the latch is read and the latch is then ready for receiving the next byte of data. The Intelligent Analog Multiplexer Board The IAM board (Fig. 4) enables the link between oscillators’ signal outputs and the frequency counter input. Since it is Fig. 4. IAM board. located inside the temperature chamber, it should have a wide operating temperature range. The main part of the IAM board is the same microprocessor used in CTCXOs. It communicates with the PC through its SCI port in the same way that the CTCXOs do. After being addressed (its address is 00), it receives data containing the address of the oscillator whose output should be connected to the frequency counter. The data is converted into an address code that is sent to the analog multiplexer through the microprocessor’s PORT B. The output of the analog multiplexer is linked directly to the frequency counter input. The size of the analog multiplexer depends on the number of oscillators to be calibrated simultaneously, which in turn depends on the capacity of the temperature chamber. For larger capacity chambers, an analog multiplexer tree would be used. The ACL Software The ACL software is divided into four parts: 1) PC software, 2) ISI software, 3) IAM software, and 4) CTCXO’s calibration mode software. The CTCXO’s calibration mode software was already described in Section II. A short description of the other three parts follows. PC Software PC software controls the operation of the temperature cham- ber and frequency counter, and it supervises the calibration procedure and the operation of the system as a whole. The program starts by reading the input parameters for the calibration process (temperature range, nominal frequency, frequency stability, etc.) from a text configuration file. It then initializes and checks the measuring instruments, oscillators, resources and the ISI board and downloads the calibration mode software to the oscillators through theISI board. Then the calibration process begins as described earlier. The oper- ation of the temperature chamber and the frequency counter is controlled by the PC software, but the calibration itself is partially controlled by the ISI software. Authorized licensed use limited to: UNIVERSIDADE FEDERAL DO RIO GRANDE DO SUL. Downloaded on October 23,2022 at 21:17:33 UTC from IEEE Xplore. Restrictions apply. HABIĆ et al.: DESIGN OF MICROCONTROLLER TEMPERATURE COMPENSATED CRYSTAL OSCILLATOR AND AUTOMATIC COMPENSATION LINE 515 When all oscillators are calibrated at all temperatures, the autonomous mode software for each oscillator is sent to the ISI board, followed by the command for programming of the CTCXO’s EEPROM’s one at a time. The program ends by reinitializing of all instruments and writing an output text file containing all relevant information about the calibration process for future reference, statistics, and checking. ISI Software The ISI software consists of seven routines, each initiated by a corresponding command received from the PC. The first one is for sending ISI status to the PC. The second and third routines are for receiving from the PC the autonomous mode software (together with the corresponding look-up table formed during the calibration process) and calibration mode software, respectively. The fourth routine is for downloading the calibration mode software to all oscillators. The fifth routine is for checking the operation of the serial bus and oscillators. The sixth and longest routine (ISICAL) is for calibration of the oscillators. Its operation is interactive with the PC software. ISICAL starts with sending the command to the IAM telling it which oscillator’s output to connect to the frequency counter. Then the PC is informed that it can start with the frequency measurement and it sends the frequency value to the ISI board. ISICAL then calculates the needed voltage value to pull the frequency back to the nominal value and sends it to the oscillator under calibration. The process is repeated until the target frequency is achieved. The corresponding temperature- voltage pair is saved in the ISI RAM and the calibration of the next oscillator begins. The routine ends when all oscillators are at their nominal frequencies. The last routine is for downloading the autonomous mode software to the oscillators. The downloading process is done for each oscillator separately, since the look-up tables differ from oscillator to oscillator. IAM Software At the start of the IAM main program the initialization of all resources and variables is done. The program then waits for an interrupt request that is automatically activated each time a character is received through the serial bus. If the character is an address and it is equal to $00 (IAM address), the appropriate variable is set. If the character is data, and the IAM was already addressed, the character is transferred to PORT B, thus selecting the applicable oscillator’s output. The variables are then reset and the next interrupt request is monitored. IV. EXPERIMENTAL RESULTS A frequency stability better then 0.5 ppm in the range of operating temperatures from 40 to 85 was obtained with a 9-bit A/D converter and 10-bit pulse-width D/A con- verter (Fig. 5). The 25 point look-up table was obtained for AT-cut crystals with uncompensated frequency to temperature Fig. 5. Frequency to temperature characteristic of compensated �CTCXOs. Fig. 6. Convergence of the frequency offset during calibration. curves with a maximum frequency deviation 25 ppm and a maximum slope 1.8 ppm . The entire CTCXO is encapsulated in a standard 36 mm 27 mm 19 mm size case. The crystal units used in our test oscillators were high quality crystal units, with compound unwanted frequency- temperature curve deviations (hysteresis, activity dips, etc.) below 0.1 ppm. If lower quality crystal units are used or a higher stability oscillator is required, a higher order A/D converter would be used. There was no need to leave room for the errors due to the trimming of oscillators to nominal frequency, since the oscillators are sealed before the com- pensation process, thus the trimming is not necessary at the time of production. Obviously, the trimming effect due to trimming necessary to correct frequency drift due to aging will degrade the stability of oscillators as in all other compensation methods. If this degradation of frequency stability can not be tolerated, correction of the frequency drift due to aging can be done by recalibration instead of by trimming capacitor. Frequency excursions of one of the sample CTCXOs during calibration is presented in Fig. 6. The number of attempts to obtain nominal frequency at a selected constant temperature depends on the closeness of the varactor voltage starting value and its final value. The diagram also illustrates the convergence of the shortened successive approximation algorithm. The ACL system calibration time for three CTCXO de- vices is shown in Fig. 7. The dark rectangles represent the time Authorized licensed use limited to: UNIVERSIDADE FEDERAL DO RIO GRANDE DO SUL. Downloaded on October 23,2022 at 21:17:33 UTC from IEEE Xplore. Restrictions apply. 516 IEEE TRANSACTIONS ON ULTRASONICS, FERROELECTRICS, AND FREQUENCY CONTROL, VOL. 42, NO. 4, JULY 1995 Fig. 7. The ACL algorithm’s time consumption. interval needed for temperature stabilization of the temperature chamber and oscillators. The white rectangles designate time consumed by the ACL software during execution of the short- ened successive approximation algorithm. The gray rectangles represent the time spent for settling after change of varactor voltage. The main problem in the design of a ACL system is to find an efficient calibration algorithm to save adjustment time. The phase noise of the CTCXO output signal is high ( 60 dB/Hz, 100 Hz) due to low rejection of harmonics in the PWM output voltage used for D/A conversion. This shortcoming may be avoided by using a classical resistive network D/A converter if the oscillator is used in applications requiring low phase noise. V. CONCLUSIONS This paper describes a new concept in the design of a tem- perature compensation network in microcontroller compen- sated crystal oscillators ( CTCXO). Oscillators are designed in such a way as to make compensation procedure as simple as possible. A new concept of a production line for automatic oscillator calibration is also described. The oscillators under calibration form an integral part of the ACL, and they perform a part of the compensation procedure. The CTCXO compensation circuit is built using a general purpose low cost microcontroller. It is a small, intelligent unit able to communicate with the outside world. The proposed concept provides fully automated, unsuper- vised temperature compensation of sealed crystal oscillators without component selection in a single temperature run. Many oscillators may be calibrated simultaneously in production and later, during use. Both digital compensation approaches are supported: dual mode MCXO and classical, temperature dependent voltage generation for VCO input control. Efficient shortened successive approximation algorithm provides fast and reliable convergence. Upgrading of a standard nonauto- matic calibration system to an ACL system is inexpensive, since only two additional low-cost boards are needed. The described ACL system, with small modifications, can be used in production facilities for a wide variety of products requiring individual adjustment. REFERENCES [1] M. E. Frerking, “Method of temperature compensation,” in Proc. 36th Annual Freq. Cont. Symp., 1982, pp. 564–570. [2] V. Candelier, G. Caret, and A. Debaisieux, “Low profile high stability digital TCXO; ultra low power consumption TCXO,” in Proc. 43rd Annual Freq. Cont. Symp., 1989, pp. 51–53. [3] R. Rubach, “Dual mode digitally temperature compensated crystal oscillator,” in Proc. 36th Annual Freq. Cont. Symp., 1982, pp. 571–575.[4] E. K. Miguel, “A temperature compensated SC cut quartz crystal oscillator,” in Proc. 36th Annual Freq. Cont. Symp., 1982, pp. 576–585. [5] T. Uno and Y. Shimoda, “A new digital TCXO circuit using a capacitor- switch array,” in Proc. 37th Annual Freq. Cont. Symp., 1983, pp. 434–441. [6] Ž. Aleksić, D. Vasiljević, A. Pavasović, “Digital temperature compen- sation of crystal oscillators using temperature switches,” in Proc. 40th Annual Freq. Cont. Symp., 1986, pp. 340–343. [7] T. Miyayama, Y. Ikeda and S. Okano, “A new digitally temperature compensated crystal oscillator for a mobile telephone system,” in Proc. 42nd Annual Freq. Cont. Symp., 1988, pp. 327–333. [8] A. Benjaminson and S. C. Stallings, “A microcomputer-compensated crystal oscillator using a dual mode resonator,” in Proc. 43rd Annual Freq. Cont. Symp., 1989, pp. 20–26. [9] R. L. Filler, J. A. Messina, and V. J. Rosati, “Frequency-temperature and aging performance of microcomputer-compensated crystal oscillators,” in Proc. 43rd Annual Freq. Cont. Symp., 1989, pp. 27–33. [10] M. Bloch, M. Meirs, J. Ho, J. R. Vig, and S. Schodowski, “Low power timekeeping,” in Proc. 43rd Annual Freq. Cont. Symp., 1989, pp. 34–36. [11] M. E. Frerking, Crystal Oscillator Design and Temperature Compensa- tion. New York: Van Nostrand Reinhold, 1978. Dejan Habić received the B.E. and M.E. degrees in electrical engineering from the University of Belgrade, Belgrade, Yugoslavia in 1989 and 1993, respectively. His research interests are in the area of industrial electronics. Aleksandra Pavasović received the B.E. and M.E. degrees in electrical engineering from the University of Belgrade, Belgrade, Yugoslavia in 1978 and 1986, respectively. She received the M.E. and Ph.D. degrees in electrical engineering from the Johns Hopkins University, Baltimore, MD, in 1989 and 1991, respectively. From 1981 to 1986 she was employed as an R&D engineer at Mihajlo Pupin Institute, Belgrade. Since 1991 she has been employed as a Consultant at the Lola Institute, Belgrade, and as an Assistant Professor at the Faculty of Electrical Engineering, University of Belgrade, Belgrade. Her current research interests are in the area of integrated circuit design. Dragan Vasiljević received the B.E., M.E., and Ph.D. degrees in electrical engineering from the University of Belgrade, Belgrade, Yugoslavia in 1974, 1977, and 1984, respectively. Since 1975 he has been employed at the Faculty of Electrical Engineering, University of Belgrade, where he is now an Associate Professor. His current research interests are in the area of crystal oscillators and digital system design. Authorized licensed use limited to: UNIVERSIDADE FEDERAL DO RIO GRANDE DO SUL. Downloaded on October 23,2022 at 21:17:33 UTC from IEEE Xplore. Restrictions apply.
Compartilhar