Functional ADC test code