For small integrated CMOS digital chips that communicate via analog signals the size and the cost of the AD-converters is a problem. An integrated CMOS AD-converter that could be built into the chip would solve this problem. In a CMOS process, the manufacturers only guarantee a very low accuracy of the recistances. The components of the ADC is therefore very inaccurate. The purpose of this report is to present a method for identification of the errors in the ADC and to perform simulations that evaluate the method. The algorithm should work while the ADC is used and it does not assume any knowledge of the input signal except that the distibution function is smooth. The estimated values can then be used in the chip to compensate for the errors in the ADC.