I read that question again, and maybe you want the other way around.
> how do I figure out what value will get placed in the Vin variable?
With 8-bit resolution, the values will range from 0 to 255.
If the input is 2.5 volts, then the value that gets placed in Vin will be ...
255 / (5 / 2.5) = 127
For 0.7v that's ...
255 / (5 / 0.7) = 35
hth,
Bookmarks