Internet PLC Forum
General => Technical support => Topic started by: evanh on November 11, 2005, 03:45:23 AM
-
This is a recommendation:
The instruction manual states clearly that the normalisation is a simple bit shift that scales the value up to 12 bit resolution. No complaints with the documentation.
However, I feel it'd be better if the scaling stretched to the full range of the 12 bit resolution. It'd be a two or three instruction operation instead of the existing one instruction. Something like: CopyOfADC = RealADC[x]; InternalADC[x] = (CopyOfADC << 2) | (CopyOfADC >> 8);
Cheers,
Evan
-
Do you mean stretching to 16-bit resolution?
-
Nope, 16 bit would be: ... (CopyOfADC << 6) | (CopyOfADC >> 4);
Note the span of 10 bits, the size of the real sample, when combining the two bit shifts. The down shift isn't nessasary but does create the additional linear stepping throughout the full dynamic range.
Evan