On Mon, 7 Feb 2000 08:22:29 -0500 Andrew T Kelley writes: > That is easy. > > 5V > | | > |___[res]__| ADC Pin > | > > Read the adc pin. > then calculate the voltage drop. > Like this: > drop = 5 - adcvalue; > Then figure out what value resistor drops x amount of voltage. > > > IT may NOT WORK... > > Right, it probably won't. You can either use a pull-up resistor to +5V (assuming the A/D is using +5V as its reference) and have the unknown to ground (which will give a nonlinear A/D versus resistance curve) or use a current source as the pull-up, which will give a linear curve. The current source could be made using any of several techniques. Could be a current mirror, a PNP transistor with zener, a constant current diode, or an op-amp constant current source. If you don't mind floating the unknown resistor, you can use an op-amp to do both the constant current and current to voltage conversion. If, for example, you ground the noninverting input, connect the inverting input through a 1K to -1V, put the unknown resistor between the inverting input and the output, the output voltage (in volts) will represent the unknown resistance in k ohm. You can scale resistors and voltages to whatever you need. Harold FCC Rules Online at http://hallikainen.com/FccRules Lighting control for theatre and television at http://www.dovesystems.com ________________________________________________________________ YOU'RE PAYING TOO MUCH FOR THE INTERNET! Juno now offers FREE Internet Access! Try it today - there's no risk! For your FREE software, visit: http://dl.www.juno.com/get/tagj.