It depends on the ADC and reference voltage being used. ADCs often have a separate input where you can feed an external reference of your choice. There are limits to the range of reference voltage though and 1V is unlikely.
there is usually a separate reference voltage (internal or external) and in microcontrollers there is also the option (usually) to use the Vcc as reference.
In any case the 0 to 1v is your input and it shouldn't be used as a reference voltage.
If your reference voltage is the Vcc then Vcc / 1024 = 0.00390625 = 3.9 mV is correct
if not then a reference voltage should be defined.
I have just checked the PIC24H and that uses 1024 for the 10 bit ADC. I must admit I tend to think of 2^n as being more common, although there are some older 8 bit ADCs that use 2^(n-1) I think. Even the ADC0808 has a 20mV step from a 5.12V reference.
I was using Vref/1023 until now because this was what i have read in "embedded C programming and the atmel AVR" and i actually thoughtit was a standard to use Vref/((2^n)-1) but a quick look in the ATMega8 datasheet shows that is is actually (Vref/(2^n)) which is Vref/1024 for the 10bit ADC of AVRs
(from the datasheet, page 5) "The bottom resistor and the top resistor of the ladder network
in Figure 1 are not the same value as the remainder of the
network. The difference in these resistors causes the output
characteristic to be symmetrical with the zero and full-scale
points of the transfer curve. The first output transition occurs
when the analog signal has reached +½ LSB and succeeding
output transitions occur every 1 LSB later up to full-scale."
However, I did not find such a detailed description of the PICs
ADC circuit, at least I did not. Perhaps it is also applied this solution?
I'm using PIC18Fxxxx uCs, for ex. last a PIC18F2620 ...
---------- Post added at 14:03 ---------- Previous post was at 13:19 ----------
In any event, it really looks that the Vref/2^n is the good, but the "full-scale value"
is not equal to Vref, but it's equal to Vref x 1023 / 1024 (in case of a 10 bits ADC).
In any event, it really looks that the Vref/2^n is the good, but the "full-scale value"
is not equal to Vref, but it's equal to Vref x 1023 / 1024 (in case of a 10 bits ADC).
I think that has to be the case otherwise you would never reach the full scale value. i.e. you want full scale to be when the voltage is above 1023/1024 * 5V for a 10 bit ADC on a 5V reference/supply voltage.