Hi, Rich
The way to give a decent name to ADC inputs ... :
.
.
.
GPIO = %00000000 ' All outputs = 0 on boot
TRISIO = %00011111 ' GPIO.0,1,2,3,4 input, GPIO.5 output
joyY CON 0 ' ADC pin number must be set as a CONstant ...
joyX CON 1
joyBtn var GPIO.2
Sout var GPIO.5
AD var byte
X var byte
.
.
.
Main:
adcin joyX, AD
X = AD
AD = 0
pause 1
adcin joyY, AD
Y = AD
.
.
.
Alain
Last edited by Acetronics2; - 7th January 2011 at 08:07.
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Bookmarks