> That's a very bad idea. > When people have started to give good advoce, then abandoning what you > are trying without listening to the advice means you are liable to > start all over again. That wasn't my intention, I am sorry if I sounded like that ; I was just trying to get rid of parameters to save time for all of us. > The problem is that you do not have a varaiable voltage, you have a > voltage with a variable impedance. > You CANNOT use the apparent impedance of the ADC as part of a voltage div= ider. > The 10k or so limit that has been discussed is nothing like the actual > ADC impedance. > The true ADC input impedance is > > =A0~~~~=3D =A0>> =A0Rinput max x 2^ADC_bits. Where do you get that Rinput max x 2^adc ? looks interesting no such thing in datasheet AFAIK. > > This is not reliable and offset voltages and bias currents may affect > results when you try to use the ARC Rin in part of a divider. > > __________ > > How to connect a pot. > > Pot has "top", "bottom" (of main track) and "wiper. > Top and bottom are often interchangeable fo what you are doing. > > Connect top to V+ > Connect bottom to ground. > Connect ADC_in to wiper. > > ADC will now see a varying =A0voltage as pot is adjusted. > > QED. > > Using a std DVM voltmeter will allow you to confirm that voltage is in > fact varying as desired. > > __ > > Now the LDR: > >> I connected a LDR (2 pins) connected in >> series with 1.5v battery to analog input and conducting the same >> configuration again, but as light hits the LDR, there seems to be no >> change in the input voltage which it should have been. >> Any thoughts? > > Same as above, the LDR must form one leg of a voltage divider. The ADC > input resistance is essentially infinity for this purpose. > > Say LDR has 2 terminals A & B. > These are usually interchangeable if it is a true LDR. > Some electronic LDR-substitutes may care about polarity. > > Choose a resistor Rdiv which is somewhere =A0between =A0LDR on resistance > and LDR off resistance. > 10k wil robably work well. > 100k or even 1 M may work better for some LDRs. > > Note that in this application you want Rdiv <=3D about 10k and LDR > Rlight_on to be < to << 10 k. > YMMV. > > Connect LDR A to V+ > Connect LDR B to ADC_In > Connect Rdiv between ADC_in and ground. > > V to ADC =3D V+ x =A0Rdiv / (Rldr + Rdiv) > > QED Yes configurations you mentioned works well, thank for guidance. --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .