How about a series arrangement instead of parallel? Wire four resistors in = a=20 1/2/4/8 ratio in series, each of which can be shorted by one of the dip=20 switches. A fifth 'source' resistor to +V provides an 'almost current=20 source' by being significantly larger than the 1/2/4/8 resistors. If you=20 could get away with the fifth resistor being arbitrarily large you could ge= t=20 as close to linear as you want. The trade off is the full-scale output gets= =20 progressively smaller as the fifth resistor gets larger. A quick spreadsheet shows that with the values in the ratio 1/2/4/8 + 16 then the full scale value is about 48% of +V and the minumum delta between two adjacent values is about 1.7% of +V. This= =20 corresponds to about 17 ADC counts. My spreadsheet seems to indicate that the ratios above, including the 16 fo= r=20 the 'source' resistor, results in the maximum value for the minimum delta=20 between two adjacent values, which makes sense to me. -- Bob Ammerman --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .