I am struggling to get meaningful values out of my ATxmega128a1 ADC using the internal temperature sensor input.
I have configured the ADC with:
1 Mhz clock (16 Mhz peripheral clock and 16 prescale divisor)
12 Bit resolution,
internal input mode with no gain,
input mux for internal temp,
internal temperature sensor is enabled.
Tried both Signed and Unsigned modes,
And used both 1V and Vcc/1.6 reference voltage,
I have read the ADC Cal value from NVM and written to the CALL CALH registers (which appears funny since the value is 0x0FF for multiple xmegas).
I am especially confused by how to use the Internal Temp Cal value that is also stored in NVM.
I have two units, one has the internal temp Cal value of 0xAE4 and the other 0x8DC.
I understand that these values are suppose to represent 85 degrees Celcius but I'm not sure how to use this since the value would seem to be dependent upon the ADC settings such as VRef and signed versus unsigned modes, etc.
Any help would be greatly appreciated.