crap.. I forgot to define my ADC:
Define ADC_BITS 8 ' Set number of bits in result
Define ADC_CLOCK 3 ' Set clock source (3=rc)
Define ADC_SAMPLEUS 50 ' Set sampling time in uS
ken
crap.. I forgot to define my ADC:
Define ADC_BITS 8 ' Set number of bits in result
Define ADC_CLOCK 3 ' Set clock source (3=rc)
Define ADC_SAMPLEUS 50 ' Set sampling time in uS
ken
I dont know if it works, I m at work now, I will see when I get home tonight
skimask, what do you mean by tripping?
:is this it...
ADCON0.2 = 1 'Start Conversion
ADCIN 1, Output_Pot 'analog pin 1 (RA1) get the 8 bit result
Ok, I see there's 2 places where I could be 'tripping' !
1st tripping - by that I mean the point where the ADCIN routine distinguishes between the light and dark area of the disc.
2nd tripping - Do you see this phrase anywhere in the manual?
I.E. YOU don't need to start the A/D conversion, ADCIN does that for you.Code:ADCON0.2 = 1 'Start Conversion
Bookmarks