36.5.3 Selecting the Format of the ADC Result
The data in the ADC Result register can be read in any of the four supported data formats. The user can select from unsigned integer, signed integer, unsigned fractional or signed fractional. Integer data is right-justified and fractional data is left-justified.
- The integer or fractional data format selection is specified globally for all analog inputs using the Fractional Data Output Format bit, FRACT (ADCCON1[23]).
- The signed or unsigned data format selection can be independently specified for each individual analog input using the SIGNx bits in the ADCIMCONx registers.
The following table provides details on how a result is formatted.
FRACT | SIGNx | Description | 32-bit Output Data Format | |||
---|---|---|---|---|---|---|
|
| Unsigned integer |
|
|
|
|
|
|
|
| |||
|
| Signed integer |
|
|
|
|
|
|
|
| |||
|
| Fractional |
|
|
|
|
|
|
|
| |||
|
| Signed fractional |
|
|
|
|
|
|
|
|