Tesaro's problem reminded me of a problem I had last week that took hours to solve. Using a 16C71, I could get accurate readings from one of the analog inputs if I read it on its own, but when I tried to read all 4 inputs in succession, the reading depended on the adjacent ones. As this was my first PIC project, I spent lots of time playing with software timing and everything else I could think of. I wonder how many times I can erase and reprogram this chip? ;) Measuring the input with a DVM or scope always showed the correct voltage on the pin, but the value determined from the A/D varied. It turned out, after pulling of much hair, that there was a cold solder joint between the sensor and the chip. It looked just fine to the eye, measured correct voltages to a high impedance meter, yet had a resistance of 10K when I finally got around to measuring the resistance from the 16C71 pin to the sensor it was supposed to be connected to. I reheated the joint, and the problems just went away. If I had been more experienced with PICs it probably wouldn't have taken so long to find, but it was a good reminder that sometimes you have to go back to the basics and think about what is going wrong. That additional 10K increased the time constant on the sampling capacitor to the point that the readings became dependent on the previous samples. If the previous sample was close to the correct voltage, everything appeared to be working fine. Otherwise, the results only tended in the right direction. > Tesaro Sandu noticed: > > the problem was the flux we use contains some sort of salts... > when we wash the boards.. these salts wash off.. but they still remain > in the washing liquid... Then when we rince them .. still a little of > the solution remained in the liquid.. when the boards dried.. this very > very very very small amount of salts.. deposited round the crystal/caps > region.. (beacause thats on the bottom of the board) anyway .. from the > salts it made the PCB conduct !!! Not much.. say 500k to 1 MEg within 2mm > BUT THATS WHAT MADE THE WHOLE PROBLEM!! Arghh took me a good arm and a > leg to work that out.. would of never suspected that .. > > Just thought i'd let yous know incase any have the same problem -- peterj@netcom.com