Hi all,

There are some problems with AVR1300 and XMEGA transfer function:

1- In signed mode(GAIN=1) the conversion result from the ADC is: Result=(VINP-VINN)*TOP/VREF..The problem arises with:

doc8077-Revision H - page 294:

With 12-bit resolution, the TOP value of a signed result is 2047 and the results will be in the range -2048 to +2047 (0xF800 - 0x07FF).

doc8032-Revision E - page 12:

TOP is the top value given by the configured resolution, which is 2048 for 12-bit mode and 128 or 8-bit mode.

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

If the second case is true, the maximum input value must be (2047/2048)*VREF and VREF as muximum input is not correct.

2- In unsigned mode the conversion result from the ADC is: Result=(VINP + Î”V)*TOP/VREF

doc8077-Revision H - page 294:

In unsigned mode the TOP value is 4095

doc8032-Revision E - page 12:

For 12-bit mode TOP is 4096 and 8-bit mode TOP is 256.

doc8032-Revision E - page 12:

With 12-bit resolution the range from GND to VREF "“ Î”V will be from approximately 200 to +4095 (0x00C8 - 0x0FFF).

If the second case is true, the maximum input value must be (4095/4096)*VREF - Î”V.