Hi, thanks for answering
I forgot to to set portD as out, and there was a short in my potentiometer. I defined portD as out and got this...
trisd =0
' Define ADCIN parameters
Define ADC_BITS 8
Define ADC_CLOCK 3
Define ADC_SAMPLEUS 50
adval var byte
TRISA = %11111111
ADCON1 = %00000010
Pause 500
loop: ADCIN 0, adval
portd = adval
Goto loop
End
then I got a different pot and It seems to work now.
Thanks!!!
Bookmarks