You can configure your own "switching" pot with a 7 position switch and resistors then use only 1 A/D port.

The values selected were not calculated for anything special just picked something that would probably give a decent spread for a 10bit A/D setting. Then using the SELECT CASE, set the values to the level "between" each setting.
Suppose position 1 value is 170 and position 2 is 327 then make your 1st CASE setting to 248, middle of the two values, and continue from there for the whole range.
Sample code:
Code:
check_switch:
ADCIN #, adval
SELECT CASE adval
CASE IS < xxx: do this or that ' Lowest value
......
CASE IS < xxx: do this or that ' Highest value
END SELECT
RETURN
I just made this a couple of months ago and works as needed!
Bookmarks