Signed Mode

In signed mode the conversion result from the ADC is:

RES=VINPVINNVREF*GAIN*TOP

VINP is the positive input and VINN is the negative input to the ADC. GAIN corresponds to the gain setting used. GAIN is 1 if gain is not used. TOP is the top value given by the configured resolution, which is 2048 for 12-bit mode and 128 for 8-bit mode.

In signed mode the result is returned as a signed number represented on a two's complement format where the MSB represents the sign bit. In 12-bit right adjusted mode, the sign bit (bit 11) is padded to bits 12-15 to create a signed 16-bit number directly. In 8-bit mode, the sign bit (bit 7) is padded to the entire high byte.

With 12-bit resolution the range from -VREF to +VREF will be -2048 to +2047 (0xF800 - 0x07FF).