you might need another read of the hardware manual for a 16f688
this will REALLY be'Define ADCIN parameters
Define ADC_BITS 10 ' Set number of bits in result
Define ADC_CLOCK 3 ' Set clock source (3=rc)
Define ADC_SAMPLEUS 50 ' Set sampling time in uS
ANSEL = %00000111 ' Enable ADC channels AN2-AN0
ADCON1 = %10000000 ' Set PORTA analog and right justify result ?????????????
ADCON1 = %10000000 ' Set Conversion Clock = FOSC/2 and bit 7 does nothing
you need
ADCON0.7=1 ' right justify result
Bookmarks