YUK! Try 12 same value resistors, and a cap. Two pins, one to feed the resistor array, and one to read the cap voltage (just a CMOS input, not A/D) Take both pins to output, low for a short time. Take the cap pin to input, no pullup, start counting time Take the resistor pin to output high. When the cap pin reads high, stop counting. The time value will tell you how many resistors are in series. P1----R1-+-R2-+-R3-+.......R12-+ The switch connects one of the + symbols to P2-------------------------+ Cap Ground If you have the time/inclination add another R in between P2 and the cap, and use the discharge time to facator out the cap value/tolerance. Discharge time = RC, and charge time = NRC, so NRC/RC = N, which is the number of resistors switched into circuit, and therefore the switch position. If you want to do it digital, a pair of HC164 shift registers will let you shift a bit till you see it on the input, with the switch selecting which SR output is looked at. Literally N clocks = switch position. Or, use an optical encoder.