Method and apparatus for automatically calibrating a digital to analog converter
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The invention relates to digital to analog converters, particularly to processor controlled systems for automatically calibrating digital to analog converters. 
     2. Description of the Prior Art 
     Digital to analog converters (DAC&#39;s) are widely utilized in the electronics industry to convert digital words into analog output signals representing the value of the digital word. At the present state of the art, it is quite feasible to manufacture accurate twelve bit or ten bit DAC&#39;s utilizing monolithic integrated circuit technology and/or hybrid integrated circuit technology. However, more accurate DAC&#39;s, (e.g., having thirteen bit accuracy or more) for example, sixteen bit DAC&#39;s, are much more expensive to manufacture. Careful internal thermal design of hybrid integrated circuit sixteen bit DAC&#39;s is necessary to minimize &#34;superposition errors&#34;. Superposition errors arise from a number of causes, including thermal variations produced by quiescent power levels changing for different operating conditions in the integrated circuit structure and non-zero temperature coefficients or tracking of temperature coefficients of various components in the integrated circuit structure. Limitations on accuracy of present state of the art sixteen bit DAC&#39;s arise from errors in gain, offset voltages, and non-linearities in the four to six most significant bits. Presently, available sixteen bit DAC&#39;s include a large number of adjustment or &#34;trimming&#34; potentiometers which can be adjusted to calibrate the four most significant bits to compensate for errors in offset, linearity, and gain. A well known technique for performing such calibration involves electrically isolating a sixteen bit DAC from an electronic system in which it operates, and manually adjusting appropriate ones of the above mentioned potentiometers to adjust the output voltage of the DAC to produce zero voltage, as measured by a six and one-half digit digital volt meter when all the digital inputs to the DAC are logical &#34;zeros&#34;. Then each of the four most significant bits is adjusted by manually adjusting others of the potentiometers to produce an output voltage difference corresponding to &#34;one least significant bit&#34; voltage differences between each of the four most significant bits and the respective sums of all less significant bits. Finally, the gain of the DAC is adjusted by applying all &#34;ones&#34; to the digital inputs of the DAC and adjusting a gain potentiometer to produce a predetermined full scale output voltage. The foregoing manual adjustment procedure has several serious shortcomings. First, the electronic system in which the DAC operates must be electrically disconnected or isolated from the DAC. This, of course, involves &#34;down time&#34; for the electronics system. 
     Accordingly, it is an object of the invention to provide a digital to analog converter which can be calibrated with minimum interruption of an electronics system in which the digital to analog converter is operatively connected. 
     A large number of adjustment potentiometers must be adjusted to accomplish accurate calibration of presently available high accuracy sixteen bit digital to analog converters. Further, expensive calibration equipment is required, such as a six and one-half digit digital volt meter costing approximately $4000. The average time for a skilled technician to calibrate present sixteen bit DAC&#39;s ranges from at least 10 minutes to well over half an hour. 
     It is another object of the invention to provide a method and apparatus for calibrating a digital to analog converter connected in an electronic system, which method and apparatus require a minimum number of manual adjustments and which require utilization of a minimum amount of low cost external equipment to accomplish the calibration procedure. 
     Presently available sixteen bit DAC&#39;s are very expensive, due to the high cost in fabricating devices with the proper thermal design, precision matching of integrated circuit components, and manufacture of high accuracy, low temperature coefficient bulk metal film resistors utilized in precision ladder resistor networks required for the four most significant bits. The cost of the numerous trim potentiometers is also quite high, as they may range in cost from $1 to more than $3 or $4. 
     It is therefore another object of the invention to provide a low cost digital to analog converter having a resolution of at least sixteen bits and having correspondingly high accuracy. 
     It is another object of the invention to provide an automatic digital to analog converter calibration system. 
     Another shortcoming of even the best of the presently available digital to analog converters having greater than approximately twelve bit accuracy is the fact that accuracy is lost due to &#34;drift&#34; of component characteristics with both time and temperature. At the present state of the art, a sixteen bit high accuracy DAC must be recalibrated at least every three months, providing that the temperature range to which the DAC is subjected varies only by less than 10° C. Any time that the temperature varies by more than 10° C., accuracy is lost and the DAC must be immediately recalibrated. 
     It is yet another object of the invention to provide a high accuracy digital to analog converter device which can operate continuously with high accuracy over a wide temperature range. 
     There are many applications for DAC&#39;s wherein it is highly necessary that the output voltage of the DAC be monotonic, that is, the output always increases as the value of the digital input word applied to the digital inputs of the DAC increases, and wherein the output always decreases as the value of the digital input word decreases. This condition is present if the DAC has appropriately small non-linearity errors and superposition errors. However, the gain accuracy of a DAC frequently is less important than the linearity accuracy or monotonicity thereof, due to the fact that DAC&#39;s are commonly utilized in applications wherein comparison of a test signal with a control signal is made; under such conditions, linearity or relative accuracy is of primary importance. Thus, in such applications, it is highly desirable that the linearity of the DAC can be quickly and conveniently calibrated and recalibrated without making any external adjustments, without using any external reference voltage source, and without electrically isolating the DAC from the system in which it normally operates. Those skilled in the art will appreciate that if a digital to analog converter appears in a digital loop (for example, in a numerically controlled machine tool), non-monotonicity of the DAC could cause a control processor to produce an erroneous result or enter into a diagnostic routine or an &#34;infinite loop&#34;. 
     It is therefore an object of the invention to provide a digital to analog converter of low cost wherein monotonicity of linearity can be automatically established by recalibration without use of any external reference. 
     SUMMARY OF THE INVENTION 
     Briefly described, and in accordance with one embodiment thereof, the invention provides a method and system for automatically calibrating a digital to analog converter without requiring that the digital to analog converter be physically disconnected from an electronic system incorporating the digital to analog converter and without requiring use of an external reference source. 
     The described calibration system includes a set of three-state latches having inputs coupled to conductors of the electronic system for receiving an input word for conversion to an analog output signal. A processor system controls the latches to apply the input word to the digital inputs of a sixteen bit main digital to analog converter (DAC) during normal operation of the electronic system. The main DAC includes a plurality of &#34;bit adjustment&#34; inputs for trimming the weight of an output signal corresponding to each of the bits that have &#34;bit adjustment&#34; inputs. The main DAC also includes an &#34;offset adjustment&#34; input and a &#34;gain adjustment&#34; input for adjusting the offset and gain, respectively, of the main DAC. A plurality of &#34;bit adjustment&#34; DAC&#39;s, an &#34;offset adjustment&#34; DAC, and a &#34;gain adjustment&#34; DAC, each having input latches, have the outputs connected to the &#34;bit adjustment&#34;, &#34;offset adjustment&#34;, and &#34;gain adjustment&#34; inputs, respectively, of the main DAC. The calibration system includes a precision voltage reference which contributes to the full scale reading of the output signal of the main DAC. The main DAC has sixteen bits, the lowest twelve of which are sufficiently accurate without calibration. The four &#34;bit adjustment&#34; DAC&#39;s, the &#34;offset adjustment&#34; and &#34;gain adjustment&#34; DAC&#39;s each have &#34;eight bit&#34; accuracy. The calibration system also includes a fourteen bit &#34;offset&#34; DAC and an analog switch of the single pole, triple throw type having outputs respectively coupled to the two inputs of a difference amplifier. The difference amplifier output is connected to the input of an analog to digital converter (ADC) which converts the amplified difference between the output voltages of the &#34;offset&#34; DAC and the analog switch to a digital word, which can then be inputted to the microprocessor. 
     During the calibration process, the microprocessor electrically isolates the inputs of the main DAC from the outputs of the input latches and applies &#34;zeros&#34; to all of the inputs of the main DAC and also to the inputs of the &#34;offset adjustment&#34; DAC and the &#34;offset&#34; DAC. The microprocessor also controls the analog switch to electrically connect its output to a ground or reference potential. The difference between the output of the &#34;offset&#34; DAC and the ground potential is converted to a first digital word which is received and stored by the microprocessor. The microprocessor causes the analog switch to couple the output voltage of the main DAC to one input of the difference amplifier. The analog to digital (ADC) converter produces a second digital word which is compared with the first digital word. The microprocessor then computes a first correction code and inputs the first correction code to the &#34;offset adjustment&#34; DAC, which produces a first correction signal to the &#34;offset adjustment&#34; input of the main DAC, causing the output voltage of the main DAC to be adjusted toward the ground potential or reference potential, thereby calibrating the &#34;offset&#34; of the main DAC. 
     Next, the microprocessor applies &#34;zeros&#34; to the four most significant bits of the main DAC and the offset DAC and &#34;ones&#34; to the other inputs thereof, and applies the output of the main DAC to the input of the difference amplifier by means of the analog switch, causing a third digital word to be produced by the ADC. The third digital word is stored by the microprocessor, which then applies a &#34;one&#34; to the fourth bit of the main DAC and &#34;zeros&#34; to all other inputs thereof. (The code to the offset DAC is not changed). The ADC produces a fourth digital word which is compared with the stored third digital word. The microprocessor compares the difference between the third and fourth digital words with a predetermined quantity representative of the difference in output voltage of the main DAC corresponding to a single &#34;least significant bit change&#34; in the value of the digital input word represented by the digital inputs of the main DAC. A second correction code is computed by the microprocessor and inputted to the &#34;bit adjustment&#34; DAC for bit 4 of the main DAC, which &#34;bit adjustment&#34; DAC produces a second analog correction signal, causing the output voltage of the main DAC to be adjusted to a value which is precisely one &#34;least significant bit voltage&#34; different from the second output voltage. The three remaining most significant bits are sequentially calibrated in like manner in increasing order. Finally, the microprocessor applies &#34;ones&#34; to all of the inputs of the main DAC, and the &#34;offset&#34; DAC, and controls the analog switch, causing the precision voltage reference and the output of the main DAC to be applied to one input of the difference amplifier, and causing fourth and fifth digital words corresponding to the value of the precision voltage reference and the output voltage of the main DAC, respectively, to be compared. A corresponding correction code is inputted from the microprocessor to the &#34;gain adjustment&#34; DAC, which produces an analog correction signal causing the output voltage to be adjusted toward the voltage of the precision voltage reference. 
    
    
     DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a detailed block diagram of one embodiment of the present invention. 
     FIGS. 2A-2C constitute a flow chart useable in explaining the operation of the system of FIG. 1. 
     FIG. 3 constitutes a flow chart useful in describing the computation of correction codes made by the microprocessor of FIG. 1. 
    
    
     DESCRIPTION OF THE INVENTION 
     The method and apparatus of the present invention can be best understood by first referring to the structure of system 10 in FIG. 1, which includes a digital to analog converter (DAC) subsystem 12. DAC subsystem 12 includes a main DAC 16 having an output terminal 20 and sixteen digital inputs connected to the respective conductors of eight bit buses 32 and 34. DAC subsystem 12 includes output circuitry including an operational amplifier 17 having a negative input connected to terminal 20 and a positive input coupled to ground conductor 30 by means of a resistor. Operational amplifier 17 has an output terminal 18, whereat output voltage V OUT  (which represents the numerical value of a digital word applied to buses 32, 34) is produced. A resistor feedback network including resistors 21 and 22 provides two alternate feedback paths from output terminal 18 for controlling the magnitude of the voltage range of V OUT . Resistors 24 and 26 can be utilized to compensate for differences in ground reference voltages between ground conductor 30 and ground conductors of a system (not shown) to which system 10 is connected. 
     DAC subsystem 12 includes a precision voltage reference 86 connected to main DAC 16 for controlling the magnitude of DAC output current I OUT  flowing into terminal 20. Six &#34;adjustment inputs&#34; indicated by reference numerals 56&#39;, 57&#39;, 58&#39;, 59&#39;, 60&#39; and 61&#39; are utilized to trim or adjust the components of I OUT  controlled by the four most significant bits of main DAC 16, to adjust the offset, and to adjust the gain, respectively, of main DAC 16. 
     Bus 32 includes eight conductors which are connected to eight inputs of main DAC 16, which conductors are connected to the respective outputs of eight three-state latches 37. Similarly, bus 34 includes eight conductors connected to eight additional inputs of DAC 16 and also connected to the respective outputs of eight three-state latches 39. The inputs of the eight latches represented by reference numeral 37 are connected, respectively, to eight conductors of bus 42, which is connected to an electronic system (not shown) in which system 10 is operatively connected. Similarly, the inputs of the eight latches represented by reference numeral 39 are connected, respectively, to the outputs of eight three-state latches 41 having their respective inputs connected to the eight conductors of bus 44, which is also connected to the electronic system (not shown). (The eight conductors of bus 42 also can be connected to inputs of three-state latches 41 so that inputs 44 can be omitted, if it is desired to connect system 10 to an &#34;eight bit&#34; electronic system rather than a &#34;sixteen bit&#34; electronic system.) Conductor 47 is connected to the enable inputs of three-state latches 41 in order to enable the eight least significant bits (LSBs) of a digital input word to be outputted from three-state latches 41 onto conductors 45 to the inputs of three-state latches 39. Similarly, conductor 46 is connected to enable inputs of latches 37 and 39 to apply the information stored in latches 37 and 39 to buses 32 and 34, respectively. 
     System 10 includes a calibration subsystem 14 which includes three-state input latches or digital input means 37, 39, and 41 and also includes four &#34;bit adjustment&#34; DAC&#39;s or adjusting means 56, 57, 58, and 59 connected to respective ones of the above mentioned &#34;adjustment inputs&#34; 56&#39;,57&#39;, 58&#39;, and 59&#39; of main DAC 16. Calibration subsystem 14 also includes an &#34;offset adjustment&#34; DAC 60 connected to &#34;offset adjust&#34; input 60&#39; of main DAC 16 and a &#34;gain adjustment&#34; DAC 61 connected to &#34;gain adjustment&#34; input 61&#39; of main DAC 16. &#34;Bit adjustment&#34; DACS 56, 57, 58, and 59, &#34;offset adjustment&#34; DAC 60 and &#34;gain adjustment&#34; DAC 61 all include input latches (not shown) which are capable of storing correction codes conducted by bus 65. Such correction codes are entered into the subject input latches when the respective DAC&#39;s are enabled by enable conductors 56&#34;, 57&#34;, 58&#34;, 59&#34;, 60&#34; and 61&#34;. Calibration subsystem 14 further includes a latch circuit 72, which includes 14 latches having their respective outputs connected to corresponding inputs of &#34;offset&#34; DAC 74 or first conversion means 74. The output of &#34;offset&#34; DAC 74 is connected to a negative input of difference amplifier or comparison means 77, which has a positive input connected to conductor 84. Difference amplifier 77 is actually of a type known as an instrumentation amplifier in the present embodiment of the invention. Conductor 84 is connected to the output of a single pole, triple throw analog switch 82 having three switchable inputs connected to conductors 87, 18, and 30 so that any one of the precision reference voltage, V OUT , or ground voltage can be applied to the positive input of difference amplifier 77. 
     The output difference amplifier 77 is connected to an analog to digital converter (ADC) or second conversion means. ADC 79 is a twelve bit ADC having its twelve digital outputs 79&#39; connected to the inputs of twelve three-state latches collectively represented by reference numeral 80. 
     The above described three-state latches, &#34;bit adjustment&#34; DAC&#39;s, &#34;offset adjustment&#34; DAC, &#34;gain adjustment&#34; DAC, latches 72, and analog switch are all controlled by microprocessor system 63. (It should be noted that any suitable type of processor oriented or computer oriented system could be used; microprocessors are readily available and are used in the described embodiment of the invention). Microprocessor system 63 includes a microprocessor or computing means, a read only memory used for storing a control program, and a random access memory or storing means. Microprocessor system 63 has a plurality of control inputs, such as &#34;Interrupt&#34; and &#34;Reset&#34; inputs, collectively represented by reference numeral 69, and a status output 70. Microprocessor system 63 has a plurality of Input/Output (I/O) terminals connected to the respective conductors of buses 65 and 67. The respective conductors of buses 65 and 67 are connected to the inputs of sixteen three-state latches collectively designated by reference numeral 49. The conductors of bus 67 are also connected to the respective outputs of eight three-state latches in block 80. Four of the conductors of bus 65 are connected to the respective outputs of four remaining latches in block 80. The conductors of bus 67 are also connected to the eight digital inputs of each of the &#34;bit adjustment&#34; DAC&#39;s 56, 57, 58, and 59, &#34;offset adjustment&#34; DAC 60 and &#34;gain adjustment&#34; DAC 61, and to the respective inputs of eight latches contained in block 72. Six of the conductors of bus 67 are connected to the respective inputs of six additional latches in block 72. Microprocessor system 63 provides a number of output control signals on a group of conductors collectively referred to as control bus 54. One of the conductors of control bus 54 designated by reference numeral 50 is connected to enable the latches in block 49 and also to an input of inverter 52. The output of inverter 52 is connected to enable the three-state latches in blocks 37 and 39. Thus, micrprocessor system 63 can isolate buses 32 and 34 from latches 37 and 39 and then apply stored information (precisely written into the three-state latches in block 49 via conductors 65 and 67) to the digital inputs of main DAC 16 connected to the conductors of buses 32 and 34. 
     Another conductor of control bus 54 is connected to enable the three-state latches in block 49. Further, individual conductors of control bus 54 are respectively connected to the enable inputs 56&#34;, 57&#34;, 58&#34;, 59&#34;, 60&#34; and 61&#34; of adjustment DAC&#39;s 56, 57, 58, 59, 60, and 61. Another conductor of control bus 54 is applied to enable the latches in block 72. Another three conductors of control bus 54 collectively designated by reference numeral 55 are applied as selection inputs to analog switch circuitry 82 to electrically connect output conductor 84 to a selected one of input conductors 87, 18 and 30. 
     The components shown in FIG. 1 may be implemented utilizing devices which are commercially readily available. For example, the three-state latches in blocks 37, 39, 41 and 49 can be implemented utilizing series 74LS373 integrated circuits, which are manufactured by various semiconductor companies. Operational amplifier 17 can be implemented utilizing a precision operational amplifier Model OP-01H, manufactured by Precision Monolithics Corp. Precision voltage reference 86 can be implemented utilizing a temperature stabilized monolithic zener reference manufactured by National Semconductor Corporation and designated as Model LM199A. The &#34;adjustment&#34; DAC&#39;s 56, 57, 58, 59, 60, and 61 can be implemented utilizing inexpensive Signetics Model 5018 eight bit DAC&#39;s. Microprocessor system 63 can be implemented utilizing a Mostek 3870 microprocessor. Difference amplifier 77 can be implemented utilizing the Burr-Brown Model 3630 instrumentation amplifier. Analog to digital converter 79 can be implemented utilizing a Burr-Brown Model ADC80 analog to digital converter. &#34;Offset&#34; DAC 74 can be implemented utilizing a fourteen bit Burr-Brown DAC71 digital to analog converter. The latches in block 72 can be implemented utilizing Series 74LS273 integrated circuit latches. Analog switch 82 can be implemented utilizing a Siliconix DG-170 analog switch. A device identical to main DAC 16 is not yet available on the market, since presently available sixteen bit DAC&#39; s do have the &#34;adjustment inputs&#34; 56&#39;, 57&#39;, 58&#39;, 59&#39;, 60&#39;, and 61&#39; only as internal nodes, but not provided as external inputs. However, various presently available sixteen bit DAC&#39;s, such as the MP8116 manufactured by Analogic Corporation, modified to provide &#34;adjustment inputs&#34; 56&#39;, 57&#39;, 58&#39;, 59&#39;, 60&#39;, and 61&#39; as external inputs could be utilized to implement main DAC 16. The assignee of this application is presently developing a suitable sixteen bit DAC to be designated as the SM10173 D/A converter submodule. 
     The detailed calibration procedure implemented by system 10 is accomplished by first adjusting V OUT  (FIG. 1) by an amount sufficient to compensate for the offset of main DAC 16. This is accomplished by adjusting current out of &#34;offset adjustment&#34; input 60&#39; of DAC 16 so that V OUT  equals the ground reference voltage when all &#34;zeros&#34; are applied to the conductors of buses 32 and 34. Next, the four &#34;bit adjustment&#34; inputs 59&#39;, 58&#39;, 57&#39;, and 56&#39; are sequentially adjusted in that order to linearize V OUT  as a function of linear increases in the value of the number represented by the digital input word applied to the digital inputs of DAC 16. Finally, the gain of DAC 16 is calibrated by adjusting the &#34;gain adjustment&#34; input 61&#39; to adjust V OUT  in relationship to the precision reference voltage produced by precision voltage reference source 86 when all &#34;ones&#34; are applied to the conductors of buses 32, 34 by microprocessor system 63. 
     Referring now to FIG. 2A, initially an operating algorithm stored in microprocessor 63 electrically isolates main DAC 16 from the conductors of buses 42 and 44 by producing a logical &#34;one&#34; on conductor 50, enabling the three-state latches in block 49, producing a &#34;zero&#34; on the output of inverter 52, thereby causing the three-state latches in blocks 37 and 39 to assume their high output impedance state. Thus, the conductors in buses 32 and 34 are electrically coupled to the outputs of the three-state latches in block 49 so that the contents thereof are applied to the respective conductors of buses 32 and 34. At this point, microprocessor 63 &#34;enters&#34; the &#34;offset adjust&#34; algorithm, as indicated by label 90 in FIG. 2A. The algorithm first causes microprocessor 63 to transmit a first pattern of logical &#34;zeros&#34; on all of the conductors of buses 65 and 67, thereby loading &#34;zeros&#34; into the latches in block 49, and causing logical &#34;zeros&#34; to be applied to all sixteen digital inputs of main DAC 16 via the conductors of buses 32 and 34, causing main DAC 16 to produce a first output voltage; this is indicated by block 91 in FIG. 2A. The algorithm causes logical &#34;zeros&#34; to be loaded into the latches of block 72 and causes an enable signal to be applied to conductor 50B of control bus 54, enabling the logical &#34;zeros&#34; to be applied to all fourteen inputs of &#34;offset&#34; DAC 74, as indicated in block 92, causing &#34;offset&#34; DAC 74 to produce a first offset signal. 
     Essentially simultaneously with the above steps, microprocessor system 63 produces an enable signal on one of conductors 55, causing the ground reference voltage on conductor 30 to be directly connected to the positive input of difference amplifier 77, as indicated in block 93 of FIG. 2A. As indicated by block 94 and decision block 95 in FIG. 2A, main DAC 16 begins conversion of the sixteen logical &#34;zeros&#34; applied at its digital inputs in a well known manner to produce a corresponding output current I OUT  flowing through output terminal 20; offset DAC 74 also begins conversion of the logical &#34;zeros&#34; applied to its inputs to produce the above mentioned first offset voltage on conductor 75. Meanwhile, microprocessor system 63 enters into a &#34;wait&#34; loop, continually testing for a status signal from ADC 79 indicating completion of the conversion. It should be noted that DAC&#39;s and ADC&#39;s normally have enable or &#34;start conversion&#34; inputs which enable the devices or cause them to begin their respective conversion operations. ADC 79 also has an &#34;end conversion&#34; status output to indicate when the conversion is complete. After the conversion by &#34;offset&#34; DAC 74 is completed, the difference between the ground reference voltage signal applied to conductor 84 via analog switch 82 and the offset output voltage on conductor 75 is multiplied by approximately 1000 by difference amplifier 77 to produce a first difference signal, which is then applied to the input of analog to digital converter (ADC) 79. Microprocessor system 63 causes a control signal to be applied to &#34;start conversion&#34; conductor 31, which causes analog to digital converter (ADC) 79 to begin its conversion process. When that conversion process is complete, an enable signal is produced on &#34;end of conversion&#34; conductor 33, causing a first digital word, which is the digital representation of the voltage at the output of amplifier 77, to be stored in twelve latches contained in block 80. The first digital word is transmitted via buses 65 and 67 to microprocessor system 63 and is stored in the random access memory thereof, as indicated by block 96 in FIG. 2A. 
     Next, microprocessor system 63 causes analog switch 82 to connect conductor 84 to conductor 81, so that V OUT  (which is now equal to the first output voltage) is applied to the positive input of amplifier 77, thereby producing a second difference voltage signal which is applied to the input of analog to digital converter 79. Microprocessor system 63 waits in a test loop until analog to digital converter 79 completes its conversion of the amplified second difference voltage signal to produce a second digital word, as indicated by block 98 and decision block 99 of FIG. 2A. 
     Next, the algorithm causes the first stored digital word to be subtracted from the second digital word (which represents the actual offset voltage of DAC 16) to produce a first comparison word. This process corresponds to block 100 of FIG. 2A. The algorithm then enters decision block 101, wherein microprocessor system 63 tests the first comparison word (produced in accordance with block 100) to determine if the error is zero. If it is, the offset adjust algorithm is exited, as indicated by label 102. However, if the error is not equal to zero, the algorithm enters block 103, and computes a first correction word or code, in accordance with computation algorithm of FIG. 3. The first correction code is then stored by microprocessor system 63. Next, the algorithm transmits the first correction code to the digital inputs of &#34;offset&#34; DAC 60, as indicated in block 104, and exits the &#34;offset adjustment&#34; subroutine, as indicated by label 105. &#34;Offset adjustment&#34; DAC 60 then automatically converts the first correction code to a first analog correction signal which is applied to &#34;offset adjustment&#34; input 60&#39; of main DAC 16, thereby causing V.sub. OUT to be adjusted to precisely equal the voltage on ground conductor 30. It should be noted that the above process can be repeated if desired to achieve increased accuracy, since the initial error of the second computation would be much smaller than for the above described first offset adjustment calibration procedure. This would be especially desirable if the initial difference between the positive and negative inputs of difference amplifier 77 were sufficiently larege to cause operation outside the linear output range of difference amplifier 77. 
     Next, the algorithm enters the &#34;bit adjustment&#34; algorithm, as indicated by label 106 in FIG. 2B. The &#34;bit adjustment&#34; algorithm then causes a second pattern of logical signals to be applied to the inputs of main DAC 16. More specifically, the algorithm causes logical &#34;zeros&#34; to be applied to the inputs of the four most significant bits of main DAC 16 and applies logical &#34;ones&#34; to the remaining inputs of main DAC 16, as indicated in block 107. Main DAC 16 converts the second pattern to a second output signal. Microprocessor system 63 also causes &#34;zeros&#34; to be applied to the inputs of the four most significant bits of &#34;offset&#34; DAC 74 and logical &#34;ones&#34; to the other inputs of &#34;offset&#34; DAC 74, as indicated in block 108. &#34;Offset&#34; DAC 74 converts the second pattern to a second offset signal. Next, the algorithm causes microprocessor system 63 to cause analog switch 82 to connect V OUT  (conductor 18) to conductor 84, thereby applying V OUT  (which is equal to the second output voltage) to the positive input of difference amplifier 77, which produces a third difference signal. This step is shown in block 109 of FIG. 2B. As shown in block 110 and decision block 111 of FIG. 2B, main DAC 16, &#34;offset&#34; DAC 74 and analog to digital converter 79 all carry out their respective conversion processes until completed, as microprocessor system 63 operates in a test loop awaiting a signal indicating that the last of the subject conversion processes is complete. At this point, a third digital word corresponding to the difference between V OUT  and the output voltage of &#34;offset&#34; DAC 74 is computed and stored in the random access memory of microprocessor system 63, as indicated in block 112 of FIG. 2B. 
     The algorithm then enters block 113, causing microprocessor system 63 to apply a fourth pattern of logical signals, including a logical &#34;one&#34; to the fourth most significant bit of main DAC 16 and logical &#34;zeros&#34; to the remaining inputs of main DAC 16. 
     As indicated in block 114 and decision block 115, microprocessor system 63 operates in a test loop awaiting the arrival of an indication that main DAC 16 and analog to digital converter 79 have completed their respective conversions. At this point, a fourth digital word produced by analog to digital converter 79 is stored in latches 80. 
     Next, the algorithm enters block 116, wherein the third reference word produced in block 112 is subtracted from the fourth digital word produced by the most recent conversion of analog to digital converter 79. This procedure produces a second comparison word which represents the change in V OUT  corresponding to the difference in value of the two digital words most recently applied to the inputs of main DAC 16 in block 107 and 113. This difference should equal the theoretical change in V OUT  corresponding to a &#34;least significant bit change&#34;, such change in V OUT  hereinafter being referred to as a &#34;LSB voltage change&#34;, in the digital word applied to the digital inputs of main DAC 16. If the second comparison word is equal to the digital equivalent of one LSB voltage change, as indicated in decision block 117 of the algroithm, there is no error, and the algorithm exits at label 118. However, if the second comparison word is not equal to the digital equivalent of one LSB voltage change, the algorithm enters block 119, wherein microprocessor system 63 enters a computation algorithm similar to that shown in FIG. 3 and computes a second correction code and stores the second correction code in the random access memory of microprocessor system 63, as indicated in block 119 of FIG. 2B. The algorithm then transmits the second correction code to the digital inputs of &#34;bit adjustment&#34; DAC 59, and exits the bit adjust algorithm label 121. &#34;Bit adjustment&#34; DAC 59 then converts the second correction code to produce a second analog correction signal, which is applied to &#34;bit adjustment&#34; input 59&#39; of main DAC 16, causing V OUT  to be adjusted to precisely equal a voltage which is one LSB voltage change greater than the most recent previous value of V OUT  produced by main DAC 16. 
     The procedure of the algorithm of FIG. 2B is in essence repeated for each of the remaining most significant bits of main DAC 16 in increasing significant bit order, except that the steps indicated in blocks 107 and 113 apply to the third most significant bit, then to the second most significant bit, etc. After the most significant bit of main DAC 16 has been calibrated in the manner of the algorithm of FIG. 2B, the linearization calibration procedure is complete. Microprocessor system 63 then jumps to the &#34;gain adjustment&#34; algorithm of FIG. 2C at label 122. 
     The &#34;gain adjustment&#34; algorithm 122 of FIG. 2C is essentially similar to the offset adjustment algorithm of FIG. 2A, except that in blocks 123 and 124 microprocessor system 63 applies all &#34;ones&#34; to the inputs of main DAC 16 and &#34;offset&#34; DAC 74. In block 125, analog switch 82 is caused to connect the reference voltage on conductor 87 to conductor 84. The reference word stored in block 128 corresponds to the full scale voltage V OUT , rather than the ground reference voltage on conductor 30, as in block 96 of FIG. 2A. In block 129, analog switch 82 is connected to V OUT , as in block 97. The steps in blocks 132, 133, 135 and 136 are entirely similar to the corresponding operations in blocks 100, 101, 103, and 104 of FIG. 2A. Thus, the &#34;gain adjustment&#34; algorithm of FIG. 2C causes the full scale value of V OUT  to be precisely adjusted with respect to the precision reference voltage produced by circuit 86, which is the only component of FIG. 1 which ever requires manual adjustment. 
     The computation made in block 103 of FIG. 2A is shown in more detail in the flow chart of FIG. 3, which sets forth the steps involved in computing the first correction code. Referring now to FIG. 3, microprocessor 63 enters the &#34;correction code algorithm&#34; at label 101. After fetching the base address (the first address of a table of correction factors stored in the read only memory of microprocessor system 63) and the first comparison word, microprocesser 63 adds the first comparison word to the base address, as indicated in block 104 of FIG. 3, to obtain the address of the required correction factor. Next, the algorithm causes microprocessor system 63 to address its read only memory (ROM) to fetch the first correction factor, as indicated in block 105. Microprocessor system 63 then generates an enable signal which causes &#34;offset adjustment&#34; DAC 60 to be enabled and outputs the fetched correction factor onto the conductors of bus 65. Offset adjustment DAC 60 then automatically generates the desired correction current into &#34;offset adjustment&#34; input 60&#39; of main DAC 16. 
     A very similar algorithm to that of FIG. 3 controls the operation of processor system 63 to compute the second correction code referred to in block 119 of FIG. 2B during execution of the &#34;bit adjustment&#34; algorithm previously described. However, one of the adjustment DAC&#39;s is selected instead of the &#34;offset adjustment&#34; DAC, so that the computed correction code is received by that &#34;bit adjustment&#34; DAC. Computation of the third correction code, referred to in block 135 of FIG. 2C is also similar to the computation described above with reference to FIG. 3. 
     Although the invention has been described with reference to a particular embodiment thereof, various other arrangements of elements and operating steps can be made within the true spirit and scope of the invention. For example, those skilled in the art will recognize the order of starting the conversions of the patterns of logic signals to the DAC&#39;s connected to buses 65 and 67 can be varied from the order set forth in the foregoing description. Further, the order of connecting the positive input of difference amplifier 77 to V OUT  and the ground reference conductor 30 or the precision voltage conductor 87 may be varied from the order described above.