Prototype ADC code