The datasheet's "1uA max leakage" is a bit pessimistic, based on my experience.
I routinely use 100k, 220k, even 560k in ADC voltage dividers and the ADC measured result is never too far from what the calc says it should be. So, based on that I don't think I've ever seen a PIC input pin set to analogue input that draws 1uA, but I guess you could be right. I always calibrate the ADC by testing, and always use a decent sized cap (0.1uF or more) on ADC inputs used to measure DC voltages.
Hello again guys,
I agree fully, when we go by the max we are looking at the device in the worst possible way. If it does what they say it could do then we will see this worst case possibility though, so to prepare for the worst we would want to make sure we cover all the bases. And this is where theory trumps experimentation unless we are willing to go to the extreme to test as well. As i stated in my other post(s), i myself used higher than 10k in at least one application and i got decent results, and that is a test by experimentation. However, my experimentation was limited to about 25 degree C ambient with maybe plus and minus 10 degree C deviation, whereas the data sheet has to cover the cases for the full range of temperature. And we usually see an increase in leakage current as the temperature rises. So if we go by the data sheet and want to cover the full temperature range and still get 1/2 bit accuracy, we must take that 1ua into account. But again this doesnt mean that every application actually needs this level of signal integrity.
To actually test this we'd need to select a random set of packages from various manufacturing lots and run the temperature up and down from the min to the max for each package. I assume that the manufacturer did this and that's why they spec plus or minus 1ua. They state 0.1ua min, but they do in fact state 1ua max and they dont state that just for the heck of it
What else would be interesting to test is if this leakage current changes with input voltage. For example, what is it at 4.9v input and what is it at 0.1v input. Do we see any error in output codes with a very high resistance? I've never tried that but it would be interesting if anyone wants to try it. Of course we'd have to repeat with 1k input series resistance too.
So actually testing for this parameter can be pretty hard to do if we really want a good idea what can happen. It's beyond most of our capability to disprove that the data sheet is incorrect in stating 1ua.
And also note that it is not *me* that is stating this 1ua, it is the manufacturer. Think about when you may have gone over the power supply rating of 6v or whatever it is. You might get away with it, you might not. But why take the chance.
There's also the possibility that the manufacturer improved the product over time, but i dont see any evidence of that on the data sheet or app notes, at least not yet.
Another interesting point is that the reference manual shows a circuit with a 100na current source in parallel with the AD input, and that is 10 times less than the max spec of 1ua which is of course 1000na. Yet they spec 10k as the max resistance. With 100na current source we could get away with 25k so why do they state 10k. That's what i mean, there are very strange conflicting data to be found there indicating that there was a mistake early in the data sheet publication.
And again, i am not arguing that you can not use 10k, i am arguing that if you want to meet the specs over the full temperature range then you need lower, and the solution is 2.5k with a 5v reference voltage, and lower with a lower reference voltage. And what we still dont know yet is if this leakage current changes with absolute input voltage level.
The problem is 2.5k sounds kinda low and people dont like that, so they want to accept 10k as the better value rather than investigate fully. For me higher works sometimes too, because that circuit application does not see the full temperature range.
BTW the application i always talk about uses a 50k resistor and a 50k thermistor in series to sense temperature and biased by a relatively stable power supply voltage of a few volts. So that works out to 25k input resistance for that circuit... and it works pretty nice
