Right justify to get the correct value/PAUSE time for 10-bit.
Code:DEFINE ADC_BITS 10 ' Set number of bits in result DEFINE ADC_SAMPLEUS 50 ' Set sampling time in uS X VAR WORD ADCON0.7=1 ' Right justification for 10-bit A/D ADCIN 1,X PAUSE X GOTO PLAY
Bookmarks