Quantcast
Channel: EngineerZone: Message List
Viewing all articles
Browse latest Browse all 28044

Re: How to calculate the ADC count for gain selection

$
0
0

Yes, as listed in ADC0CON Bit 10 ADC0CODE the "binary" is two's complement coding.

 

And as can be seen from the code provided:

 

Voltage = ADC0DAT * Vref / Gain / (2^N-1) for uni-polar coding

 

and as can be expected for tow's complement

 

Voltage = ADC0DAT * Vref / Gain / (2^(N-1) - 1)

 

Simply try it by modifying the appropriate line in the code.

 

Thanks for that hint - we add with the next update of the data-sheet to make this a bit more obvious.


Viewing all articles
Browse latest Browse all 28044

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>