Any electronic instrumentation measures the physical variable element by comparison, or to another known part or to a known internal reference. All the other kind of magic only with "Magic Lights and Sound" in Holywood, or using a RC timming constant :) You can choose any of the following 3 options. Pick any TWO from "Fast", "Good", "Low Cost". OPTION #1: (Not easy, Not simple) The most common way to produce a ohm-meter is via a constant current source. .----------o---> ADC Input | | / \ | +10Vcc-----/ \ '---> -10Vss----/_____\ UNKNOWN R (UR) + - .---> | | | VRef o----' o--------o 0.1V | | === C R 100 Ohms (RF) | | Gnd Gnd The above circuit will try to supply 1mA through UR doesn't matter what. High values of UR will generate high voltage to ADC input, zero ohms at UR, will generate 100mV at ADC input. As the current is constant 1mA (with some UR), there is a 100mV over RF always, so your software should reduce it from the actual ADC output. RF = 100 Ohms, and UR from zero to 4900 Ohms will generate ADC input voltages from 100mV up to 5000mV. So, RF would be your scale range. RF = 10 Ohms, UR range up to 490 Ohms. RF = 100 Ohms, UR range up to 4900 Ohms. RF = 1000 Ohms, UR range up to 49k Ohms. RF = 10k Ohms, UR range up to 490k Ohms. ADC input overflows above 5V means the op-amp output swings toward +10V (>5Vdc) when UR is above RF range. UR = infinite (open), op-amp output goes close to +10V. You could also control VREF to change range (restrictions). OPTION #2: (Simple, but not easy) Using a discrete ADC unit that can accept a VREF from 0.1 to 4Vdc, you could build this circuit: +4Vdc | | R1 RANGE (=R2) | | o-----> ADC VREF | R2 (RANGE) | o-----> ADC INPUT | R3 (UNKNOWN) | | Gnd Vref = 4 * (R2+R3) / (R1+R2+R3) Input = 4 * R3 / (R1+R2+R3) Suppose ADC is 12 Bits unipolar, so full scale (FS) = 4095 If R2 = 10k and R3 = Unknown R3 = R2 / ( FS / ADC_OUT - 1 ) ------------------------------ Examples: ADC output = 50 ADC output = FS / ( 1 + R2 / R3 ) 4095 / 50 = 1 + R2 / R3 81.9 - 1 = R2 / R3 R3 = R2 / 80.9 = 10000 / 80.9 = 123.60 Ohms ADC output = 300 4095 / 300 = 1 + R2 / R3 13.65 - 1 = R2 / R3 R3 = R2 / 12.65 = 10000 / 12.65 = 790.51 Ohms ADC output = 1000 4095 / 1000 = 1 + R2 / R3 4.095 - 1 = R2 / R3 R3 = R2 / 3.095 = 10000 / 3.95 = 3231 Ohms ADC output = 2047 4095 / 2047 = 1 + R2 / R3 2.000 - 1 = R2 / R3 R3 = R2 / 1.000 = 10000 / 1.000 = 10k Ohms ADC output = 2356 4095 / 2356 = 1 + R2 / R3 1.738 - 1 = R2 / R3 R3 = R2 / 0.738 = 10000 / 0.738 = 13550 Ohms ADC output = 3000 4095 / 3000 = 1 + R2 / R3 1.365 - 1 = R2 / R3 R3 = R2 / 0.365 = 10000 / 0.365 = 27397 Ohms ADC output = 4094 4095 / 4094 = 1 + R2 / R3 1.0002 - 1 = R2 / R3 R3 = R2 / 0.0002 = 10000 / 0.0002 = 50 MOhms ADC output = 4095 4095 / 4095 = 1 + R2 / R3 1.000 - 1 = R2 / R3 R3 = R2 / 0.000 = 10000 / 0.000 = Open Circuit In any case, VREF would swing between Vcc/2 to Vcc, since R1=R2. R1=R2 defines the mid range of the curve. OPTION #3: Using a discrete ADC unit with diferential VREF and Input pins. +4Vdc | | o-----> ADC VREF + | R1 (RANGE) | o-----> ADC VREF - | o-----> ADC INPUT + | R2 (UNKNOWN) | o-----> ADC INPUT - | Gnd Vref = 4 * R1 / (R1+R2) Input = 4 * R2 / (R1+R2) R2 = ADC_OUT * R1 / ADC_FS If ADC_FS (full scale) = 4095, ADC_OUT = 1000 R1 = 100k R2 = 1000 * 100k / 4095 = 24420 Ohms R1 will be your full scale range. OPTION #4: (Easy, but not simple) PIC port pin A output-----. | R Unknown | PIC port pin B input------o | === C | Gnd Flip A to + and measure time it takes to charge C. Long time means High Value R. Create a linearization formula to process the measured time, or a PWM output at A (increasing the + pulse width along with the time), so the ramp on C will be linear.