peter green wrote: > The problem is for the ladder to work corrrectly you need switches > that switch between 0V and 5V, not switches that switch between a > defined voltage level and open circuit. Are you sure about that? You are right if you think of the R-2R ladder as being a voltage source. Think of it as being a variable resistance instead. Of course then you nee= d a current source to turn the value into a linear voltage, but he's got enough A/D resolution for a compromise to work. For example, if a bias resistor always drops at least 1/2 the voltage, you get at most a 2:1 non-linearity with the readings being spread over half the A/D range. Another way to look at that is that you lose 2 bits from the A/D result. That brings a typical PIC 10 bit A/D down to 8 bits in the usable range, which should be good enough to detect 16 different levels (4 bits). ******************************************************************** Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products (978) 742-9014. Gold level PIC consultants since 2000. --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .