Mike, The equation you suggested is absolutely right -- that's exactly the function I want, although the circuit doesn't have to be single supply. Further, to clear things up w/r/t an earlier suggested solution: Vout isn't necessarily going into an ADC -- it might very well stay analog, so the output has to be linear. Seems like it'd be totally doable with a few op amps -- is that true? Thanks again, Todd ------------------------------------------------- Mike Hord wrote: To clarify: Given Va, Vb, and Vc, with output Vout and single-rail supply Vdd: Vout = [(Vb-Vc)/(Va-Vc)]*Vdd where Va > Vb > Vc, right? Mike H. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist