Cutoff = Vref / (2^bits)
For your example...
Vref = 5 volts
bits = 10
So...
Cutoff = 5 / (2^10) = 0.0048828125
That seems to be a very helpful way of expressing it, and I believe it is correct.
However, in one sense it is a lot more crude than I had expected, and in another way it answers a doubt that was in my mind when I wrote Reply #67.
If you imagine a 2-bit ADC - which can return values 0, 1, 2,and 3 and if you imagine that Vref is 4v. Then the cutoff will be 4 / (2^2) = 1. Which means that the changeover points will be 1, 2, and 3. The reason I see that as crude is that anything up to 0.999v will be reported as 0. And the answer to my doubt is that, by not having the changeover points at the half-way points there is no need to figure out how the first and last half divisions need to be figured (for example 0.5 and 3.5 in the simple example).
Now, what does that tell us about the process that started this Thread - how to convert the ADC value back to the voltage from which it was derived.
If the simple ADC produces a value of (say) 3 we can convert it back to a voltage either with
Vref / 2^n * ADC (the equivalent to using 1024) or
Vref / (2^n) - 1 (equivalent to using 1023 - the number of intervals)
4 / 2^2 * 3 = 3 and
4 / (2^2) - 1 = 4Which is the correct answer?
The ADC would have produced 3 for an input voltage between 3v and 3.999v and we cannot know any closer than that what actually happened. So, in a sense, neither answer is correct and a better answer would the average of them - 3.5v.
Which I think can reasonably be extrapolated to the real 10bit ADC by saying that either calculation will be close enough.
...R