On 22/05/2011 14:41, Yigit Turgut wrote: > Hi everyone, > > I brought my old stash alive and found a couple of 18f2550's and > decided to use them instead of throwing them away. I built a very > simple 2 channel 8-bit ADC application and it works as expected. I > can read the input voltage up to %98 precision which is enough for me > considering the PIC does it all, it does it's job well. Then I decided > to use the circuit as an ohm meter to read input impedance. Input > range is between 0-5V, I attached a 10K pot and connected to a 1.5V > battery to see the voltage change as a play with the pot but there > seems to be no change which doesn't make sense. AN0 is input, I am > sure experienced users on list can find a solution very quickly. > > Have a nice sunday! How is the pot actually connected? You don't show it on your schematic. What voltage/value are you seeing? (as an aside, I thought the 2550 has=20 a 10-bit ADC?) If I understand you right, it works okay with some voltage "directly"=20 applied to the input, but not when you apply through the pot? I can't see any reason the pot wouldn't work too with the ends at=20 Vdd/Vss and wiper to AN0, providing the voltage driving the pot is of a=20 low enough impedance not to raise the total over whatever it is MC=20 recommends (10K generally IIRC) - have you confirmed with a=20 multimeter/scope the voltage is actually present and changing at the=20 pin? (i.e. the pot isn't dodgy or you have an open circuit somewhere) Also, your circuit doesn't show any power bypass caps in place. --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .