Can anyone tell me why I am getting 16 bit results from this code? I expect at 5 volts in I should see 1023 but I see 65535.I am using a 16f616.



DEFINE ADC_BITS 10
DEFINE ADC_CLOCK 3
DEFINE ADC_SAMPLEUS 50
TRISA = 255 ' Set PORTA to all input
ADCON1 = 2 ' PORTA is analog
ADCIN 0, A0 ' PORTA.0 PIN 13