the present invention is a system for minimizing digital - to - analog converter correction trims to increase the accuracy of the dac . a complete exposition of the principles underlying the present invention is set forth in an unpublished thesis by one of the inventors entitled &# 34 ; a method for correcting static digital - to - analog converter errors &# 34 ; which is included in this application as appendix a . to better describe the invention , a brief overview of the operation of a typical current switching dac , typical errors characterizing a current switching dac , and the walsh function technique for analyzing the errors of a dac will be described with reference to fig1 , 3 , and 4 . the algorithm utilized to implement the present invention will be described with reference to fig6 and a block diagram of a system for implementing the invention will be described with reference to fig7 . referring now to fig1 the current switching dac 10 includes a plurality of switches 12 , a plurality of weighting resistors 14 , a voltage reference source 16 , an output op - amp 18 , and a feed - back resistor 20 . the switches 12 are controlled by the digits in the digital input code . typically , if the input digit is a 1 , the switch is closed and if the input digit is a 0 , the switch is open . thus , when a 1 is present in a particular bit position of the digital code , current will flow through the weighting resistor 14 corresponding to the position of the 1 in the binary input code . the weighting of the resistors 14 is set so that the current flowing through the resistor is proportional to the number encoded by the position of the bit in the input digital code . for example , consider the relationship of the current flowing through the resistor with value 32r and the resistor with value 4r . the switch associated with the 32r resistor is controlled by the digit in bit 5 , with the value of the current flowing through the 32r resistor designated on lsb ( the current corresponding to the least significant bit of the digital code ). the value of current flowing through the resistor 4r will be equal to 8 lsbs since the current is proportional to the value of resistance due to the fact that the reference is a constant and the various resistors are connected between v reference and ground in parallel . thus , if bit 5 encodes a 1 , then bit 2 encodes an 8 . ideally , the decimal value encoded by in the input code will correspond to the current entering the op - amp divided by 1 lsb of current . the op - amp 18 feedback resistor 20 combination converts this current to an output voltage level . the performance of the dac is specified by a transfer characteristic which relates the analog output voltage value to the value of the input digital signal . ideally , this transfer characteristic would be a straight line passing through y = 0 , however typically the transfer characteristic is specified by the following formula . ## equ1 ## where a is the gain of the dac , m is the offset or y intercept of the graph of the transfer characteristic , α i is the weighting factor of bit i , and b i is equal to 1 when bit i is equal to 1 and 0 otherwise . this deviation from a linear relationship determines the error function . fig2 a through 2d illustrate the various parameters for specifying the error function . referring to those figures , in fig2 a the offset error is depicted . the dotted line 30 in each figure represents the ideal transfer characteristic passing through 0 while the solid line 32 represents the actual transfer characteristic of a realizable dac . in fig2 a , the actual transfer characteristic is linear , but the y intercept is offset by the value m from 0 . referring now to fig2 b , a gain or range error is depicted . the full scale value is defined as the analog voltage signal corresponding to the maximum value of the digital input signal , typically ( 2 n )- 1 . the deviation of the full scale value from the predicted end point value is the range error . another measurement of this error is the deviation of the slope of the actual transfer characteristic from the grain or slope of the ideal transfer characteristic . referring now to fig2 c , a linearity error is depicted and the concept of differential error will be described . nonlinearity is the deviation of the actual transfer characteristic from a straight line drawn through the end points of an actual transfer characteristic but does not include errors due to offset and range . differential nonlinearity is defined as the difference between two adjacent digital input values from the ideal of plus or minus one lsb expected value of that difference . that is , adjacent digital input values differ by one least significant bit and accordingly the difference between an analog output signal corresponding to those adjacent values should be 1 lsb of voltage . fig2 d illustrates an error measure wherein a straight line is fitted to the actual transfer characteristic to minimize the mean square error between the straight line and the actual transfer characteristic . conventional error correction systems utilize an end point fir to generate laser trims . it is apparent from considering fig . d , however , that the end point fit does not necessarily minimize the mean square error . accordingly , improvements to an end point fit are necessary to increase the accuracy of a dac . the various error parameters may be reduced by varying the values of the weighting resistors 14 in the dac 10 . this process is termed &# 34 ; trimming &# 34 ; and may be accomplished by high power laser beams or other methods as described , for example , in the book edited by sheingold entitled analog - digital conversion notes , analog devices , 1977 . this trimming process is expensive and time - consuming and it therefore is highly desirable to minimize the number of weighting resistors that must be trimmed to reduce the error function to specified limits . in conventional methods of error correction utilizing an end fit , these trims are implemented to reduce the deviation of the actual error function from a straight line drawn through the end points of the actual error function . as described more fully in appendix a , the transfer characteristic may be represented by a sum of weighted walsh functions with the weighting factor of each walsh function corresponding to the contribution of a particular weighting resistor to the overall actual transfer characteristic . this walsh technique will be described more fully below with reference to fig5 . in the present system , a post correction technique is utilized . a block diagram for implementing this post correction is depicted in fig5 a . this post correction system by one of the applicants in a paper entitled &# 34 ; applications of walsh functions to converter testing ,&# 34 ; digest of papers , 1980 , test conference , nov . 1980 . in fig5 a , the digital input code is supplied to the inputs of the dac 10 and a correction block 60 . the correction block 60 generates an analog correction signal . the analog correction signal and dac output signal are combined at a summing element 62 to generate a corrected analog output signal . in the correction block 60 , a set of walsh correction terms are stored and utilized to generate the analog correction signal . a system for generating these walsh correction terms and specific implementations of the correction block 60 are described below . a simple example of the conventional error reduction method will now be described with reference to fig3 a through 3f to illustrate the problems inherent in these conventional methods . fig3 a through 3c illustrate the transfer characteristic and end point fit line of a device that has a linear error in the weighting resistor with value r which corresponds to a linear error in the most significant bit ( msb ) of the dac 10 . fig3 a illustrates the ideal transfer characteristic curve of a dac . fig3 b illustrates the actual transfer characteristic of a dac having a linear msb error . note that the transfer characteristic of the device increases from the ideal value for a digital input equal to , or greater than , one - half the maximum digital input of the device , which corresponds to the value 2 n divided by 2 . the switch corresponding to the msb weighting resistor , resistor value 2r , is turned on at this value and remains on for all subsequent values . fig3 c depicts the ideal transfer characteristic 30 , the actual transfer characteristic 32 , and a straight line connecting the end points of the actual transfer characteristic 40 . fig3 d illustrates the error function which depicts the difference between the actual transfer characteristic 32 and the ideal transfer characteristic 30 . from the graph represented in appendix a , it is apparent that this error function can be easily obtained by inverting an offsetting the first walsh function . thus the principle stated above , that the contribution from each weighting resistor may be represented by the walsh function , is illustrated in fig3 d . accordingly , the error function could be reduced to 0 by trimming of the value of the resistor corresponding to the msb of the input digital code . thus , the error function depicted in fig3 d could be totally eliminated by trimming only one resistor . conventional error correction techniques , however , result in several trims being required to reduce the error function depicted in fig3 a . this problem is illustrated in fig3 e in the case of an end point fit technique and in fig3 f for the case of a least mean square error fit technique . referring now to fig3 e . the error function , being the difference between the end point fit straight line and the actual transfer characteristic 32 , is depicted . since this error function does not correspond to any particular walsh function , a linear combination of walsh functions is required to approximate the error function . the coefficients of the walsh terms required to fit this function are set forth in appendix a . a significant number of trims is required to reduce the error function to 1 lsb . similarly , fig3 f depicts the mean square error function and the walsh coefficients required to fit this function are also depicted in appendix a . the present invention provides a unique system for identifying which weighting resistors are contributing to the error in the actual transfer characteristic . to fully understand the concept of the present invention , a brief description of the walsh decomposition of a transfer characteristic will now be described with reference to fig4 a and 4b . for an n bit ideal transfer characteristic the walsh expansion is given by the following equation : ## equ2 ## where a is the gain of the device and m is the offset . thus , each of the non - zero binary terms is : these walsh coefficients for the ideal transfer characteristics are graphed in fig4 a for an eight bit dac . note that the graph is a typical exponential function . if the log base 2 is taken of the absolute value of the walsh terms set forth above , then the following relationships result : ## equ4 ## the log base 2 of the absolute values of the walsh terms are graphed in fig4 b . here , the non - zero walsh terms are related with a slope of a negative 1 and the intercept is determined by the slope of the original transfer characteristic . changing the slope of the transfer characteristic will only raise or lower the straight line of fig4 b . it is the recognition of the linear relationship between the walsh terms in the log domain that is the basis for the novel fitting technique of the present invention . graphical analysis in which the log base 2 of walsh terms is utilized is termed analysis in the log domain . the advantages of error reduction in the log domain are illustrated in fig5 with respect to the error described above with reference to fig3 a through 3f . for an msb error the only walsh term that deviates from the ideal is the term corresponding to the first walsh function , i . e ., α 1 . this error is depicted in fig5 . note that the remaining walsh terms correspond to the straight line in the log domain . if a straight line were fit to pass through the straight line formed by the non - msb walsh terms , then the precise magnitude of the msb would be provided . accordingly , only a trim corresponding to the msb weighting resistor would be required to fit the actual transfer characteristic to the ideal transfer characteristic in this example . this example illustrates the dominant term concept , i . e ., that a limited number of walsh terms may describe the error characteristic of the dac . further , test data establishes that this error characteristic may be described by low order walsh correction terms . additionally , once this fit had been obtained the values of the walsh coefficients in the log domain could be utilized to calculate the slope and offset of the actual transfer characteristic by utilizing the following formulas : ## equ5 ## where β i and β 0 are calculated from equations ( 3 ) and ( 4 ), respectively . as described above , the present invention determines the error in the walsh terms by fitting the walsh terms to a straight line in the log domain . fig6 is a flow diagram of an algorithm for fitting the linear transfer characteristic in the log domain to minimize the number of terms outside a given error band . referring now to fig6 the transfer characteristic of the dac is first generated by stepping the device through all or part of its states , i . e ., sequentially generating digital input codes corresponding to all possible values , reading the analog value of the device output at each state , and storing the data array obtained in a file in a computer memory . a walsh transform is then taken of this data to generate the set of binary walsh terms characterizing the actual transfer characteristic of the dac . the log base 2 of the absolute value of each walsh term in this set is then taken to generate a set of log domain walsh terms . an error range must then be determined . the value of this error range is determined by the deviation of the actual transfer characteristic from an ideal transfer characteristic that is desired . for example , if the deviation from the ideal is to be less than one - half of an lsb , then the acceptable error range might be 1 / 8th of an lsb . the value of the error range is then used to generate an acceptable error envelope in the log domain for fitting the walsh terms to a straight line in the log domain . generation of this envelope is accomplished by the following steps : first , select a dummy slope for the test transfer characteristic to position the fitting line in the log domain at a selected point on the y axis in the log domain ; second , generate two envelope arrays , a first envelope array being generated by adding the error range to each of the binary walsh terms of the ideal transfer characteristic , and the second fitting array being generated by subtracting the error range from the binary walsh terms of the ideal transfer characteristic ; and , third , taking the base log 2 of each fitting array and storing these values in a computer memory . the error range determines the boundary of the envelope , while the slope chosen determines the y intercept of the envelope . thus , choosing a dummy slope to start with simply positions the envelope at a given y axis location in the log domain . accordingly , the dummy slope is chosen to position the envelope below all the points of the set of log domain walsh terms corresponding to the actual transfer characteristic . the envelope is then incremented upward and the number of terms in the set of log domain walsh terms corresponding to the actual transfer characteristic included in the envelope at each increment is determined and stored in a separate file . since incrementing the envelope corresponds to increasing the slope of the ideal transfer characteristic , the size of the increment is determined by how fine of a slope change in the transfer characteristic is desired . after the envelope has been incremented past all of the terms in the set of log domain walsh terms corresponding to the actual transfer characteristic , the array holding the number of terms in each increment is checked to determine the increment with the largest number of terms . the increment state with the largest number of terms is then used to select a slope and intercept that minimizes the number of binary terms corrected . the deviation of the terms in the set of log domain walsh terms from this best fit straight line is then an indication of the magnitude of the trims that must be implemented to reduce the deviation of the actual transfer characteristic of the dac from the ideal transfer characteristic , determined from the fitting technique described above , to the acceptable error range desired . from equations ( 3 )-( 5 ) it is apparent that the magnitudes of the walsh correction , alpha i , are equal to exponential , base 2 , of these deviations in the log domain . a system for implementing the above - described line fitting algorithm in the log domain will now be described with reference to fig7 . fig7 is a block diagram depicting the various functions of the system . a pattern generator 70 is connected to the input of a dac under test 72 . this pattern generator sequentially generates the possible values of the input digital code to step the dac through its entire input arrays . the analog output of the dac corresponding to each input state is measured by a digital volt meter 74 . the digital volt meter 74 is controlled and read by an ieee interface bus 76 . the data obtained from the digital volt meter 74 is stored in the memory of an array processor 78 for processing to implement the line fit algorithm . in practice , the digital volt meter utilized was a hewlett - packard , model 3665 digital volt meter . the pattern generator 70 ieee interface 76 and array processor 78 utilized were the functional components of a fairchild series 80 analog test system . fig8 is a schematic diagram of a particular embodiment of the post correction systems depicted in fig5 a . in fig8 an array 80 of exclusive / or ( xor ) gates 82 is coupled to a first digital bus 84 . the first digital bus 84 is also coupled to the input port of dac 10 . output ports 86 of the xor array 80 activate switches 88 that couple the first terminals of weighting resistors 90 to a + vref terminal 92 . the second terminals of the weighting resistors 90 are coupled to a correction line 94 coupling the dac output to a - vrep terminal 96 . the correction line 94 and dac output are coupled at summing node 98 . the xor array 60 converts the digital input code to a walsh input code . in fig8 a three - bit input code is converted to an eight - bit walsh code . the non - zero terms in the walsh code indicate the particular walsh terms that contribute to the value of the dac transfer characteristic for each digital input code . the amplitudes , alpha i , of the weighting resistors are multiples of the walsh correction terms for the dac 10 . the walsh term corresponding to each weighting resistor are listed in fig8 . for a given input code , the switches 88 for the contributing walsh terms are closed and current flows through the corresponding weighting resistors 90 . the sum of the voltage drops across these resistors 90 is the analog correction signal for the given digital code . the combination of the dac output signal and the analog correction signal is the corrected analog output signal . fig9 is a schematic diagram of another embodiment of the post correction system of fig5 a . in fig9 the first digital input bus 84 is coupled to the input ports of programmable logic array ( pla ) 100 and a dac 10 . a 2 &# 39 ; s compliments adder 102 has inputs coupled to the output port of the pla 100 and the output port of a term register 104 . the output port of the adder 102 is coupled to the input port of a correction dac 106 . the output ports of the dac and correction dac are coupled at a summing node 98 . the pla 100 implements the xor array for converting the input digital code to the digital walsh code . the walsh correction terms are stored in the term register 104 . for a given input code , those correction terms corresponding to non - zero terms in the digital walsh code are added in the 2 &# 39 ; s compliment adder to form a digital correction code . this digital correction term is converted to an analog correction signal by the correction dac 106 . the analog correction signal and dac output signal are combined at the summing node 98 to form the corrected analog output signal . fig1 is a schematic diagram of still another implementation of the post correction system of fig5 . in fig1 , the first digital bus 84 is coupled to the input port of a look - up table ( lut ) 110 and to the input port of the dac 10 . the output port of the lut 110 and input port of the correction dac are coupled by a second digital bus 112 . the output ports of the dac and correction dac are coupled at the summing node 98 . the digital correction terms for each value of the input digital code are computed and stored in the lut 110 at the storage location accessed by the corresponding input code . these terms are transferred to the correction dac 106 to generate the analog correction signal for the corresponding input code . in the embodiment described with reference to fig7 the lut 110 may be implemented in the memory of the series 80 test system . thus , the system utilized to calculate the walsh correction terms may also be utilized to implement post correction . in each of the embodiments described with reference to fig8 - 10 , the post correction system must be calibrated by providing the values of walsh correction terms to post correction block . these terms are computed utilizing the steps described with reference to fig6 . the preferred embodiment has been described in terms of a specific line fitting algorithm and the system for implementing the logarithm has been described with respect to specific electronic components . however , it is obvious to a person of ordinary skill in the electronic art that variations in the above - described embodiment could be implemented to utilize the invention . for example , alternative line fitting algorithms are well known and described , for example , in the book by hastings entitled approximations for digital computers , princeton univ . press ( princeton , 1955 ) and the book by freund entitled dicitionaly / outline of basic statistics , mcgraw - hill , ny 1966 . additionally , alternative digital circuitry for implementing the algorithm would be obvious to a person of ordinary skill in the art . further , although the embodiment described above was described with reference to a particular dac topology it is emphasized that the principles of the invention may be applied to dacs having different topologies than described above . for example , the dac may be an r - 2r current weighting network or assume other topologies such as described in the above referenced book edited by sheingold . additionally , several specific embodiments of a correction system for utilizing the walsh correction terms have been described . other systems for utilizing these correction terms to compensate for dac errors will now be apparent to persons skilled in the art . therefore , the scope of the invention is not limited by the above - described embodiments but rather is defined by the appended claims .