ADCON1 = %00000011 ; this line just destroyed all your definesDEFINE ADC_BITS 8
DEFINE ADC_CLOCK 3
DEFINE ADC_SAMPLEUS 100
ADCON0 = %00000000
ADCON1 = %00000011
ADCON1 = ADCON1 | %00000011 ; will set bits 0 and 1 without wrecking the others
ADCON1 = %00000011 ; this line just destroyed all your definesDEFINE ADC_BITS 8
DEFINE ADC_CLOCK 3
DEFINE ADC_SAMPLEUS 100
ADCON0 = %00000000
ADCON1 = %00000011
ADCON1 = ADCON1 | %00000011 ; will set bits 0 and 1 without wrecking the others
Last edited by richard; - 17th November 2015 at 09:52. Reason: wrong line
Bookmarks