code to test ADC