Xmega ADC calibration value

Go To Last Post
9 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The 12 bit calibration value for both ADCs on both of my Xplain boards is the same number, 0x0ff. If I had a suspicious mind, I would be suspicious. :)

To be clear, that's CALH and CALL in the ADC. In the Production Signature Row, they are called ADCACAL0/1 and ADCBCAL0/1.

Everything else in the Production Signature Row seems less suspicious. Maybe they used a random number generator for those. :)

Steve

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

steve17 wrote:
The 12 bit calibration value for both ADCs on both of my Xplain boards is the same number, 0x0ff.
I would expect the calibration values to be similar, if not identical, for two ADCs on the same die. They should still be close but with larger variance for different dice on the same wafer. The largest variances would be expected between dice on different wafers, from different production runs, and from different production lines.

The real question is, with the identical calibration values do you get similar conversion values with the same input signal?

Don Kinzer
ZBasic Microcontrollers
http://www.zbasic.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Don't rush me. First I get the calibration values. The conversion results will come in due course. :)

Am I the only one who has 0x0ff calibration values?

I do have some preliminary results. Too preliminary to prove anything. I can measure the chip temperature, but I don't yet know how to convert the results to the more popular Celsius or Fahrenheit scales.

ADC A channels 0 and 1 give the same results. The counts range from 0x095b to 0x0964.
ADC B channels 0 and 1 give the same results. The counts range from 0x0955 to 0x095e.

I don't have my other Xplain plugged in at the moment. I repeat, these results are very preliminary. I haven't yet confirmed that I am using the ADC correctly.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

did you read the temperature reference slope value from the signature row? if so, which offset is it inside the row? I'm currently trying to use the temp reference, but haven't found the offset of the slope in the signature row anywhere..

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I read it, but I don't know what to do with it. I haven't studied how to use it to get results in Celsius, or whatever.

If you can't find where it is in the Production Signature Row, look in the header file for the chip in Winavr.

Here's the relevant part of iox128a1.h

/*
--------------------------------------------------------------------------
NVM - Non Volatile Memory Controller
--------------------------------------------------------------------------
*/

/* Production Signatures */
typedef struct NVM_PROD_SIGNATURES_struct
{
    register8_t RCOSC2M;  /* RCOSC 2MHz Calibration Value */
    register8_t reserved_0x01;
    register8_t RCOSC32K;  /* RCOSC 32kHz Calibration Value */
    register8_t RCOSC32M;  /* RCOSC 32MHz Calibration Value */
    register8_t reserved_0x04;
    register8_t reserved_0x05;
    register8_t reserved_0x06;
    register8_t reserved_0x07;
    register8_t LOTNUM0;  /* Lot Number Byte 0, ASCII */
    register8_t LOTNUM1;  /* Lot Number Byte 1, ASCII */
    register8_t LOTNUM2;  /* Lot Number Byte 2, ASCII */
    register8_t LOTNUM3;  /* Lot Number Byte 3, ASCII */
    register8_t LOTNUM4;  /* Lot Number Byte 4, ASCII */
    register8_t LOTNUM5;  /* Lot Number Byte 5, ASCII */
    register8_t reserved_0x0E;
    register8_t reserved_0x0F;
    register8_t WAFNUM;  /* Wafer Number */
    register8_t reserved_0x11;
    register8_t COORDX0;  /* Wafer Coordinate X Byte 0 */
    register8_t COORDX1;  /* Wafer Coordinate X Byte 1 */
    register8_t COORDY0;  /* Wafer Coordinate Y Byte 0 */
    register8_t COORDY1;  /* Wafer Coordinate Y Byte 1 */
    register8_t reserved_0x16;
    register8_t reserved_0x17;
    register8_t reserved_0x18;
    register8_t reserved_0x19;
    register8_t reserved_0x1A;
    register8_t reserved_0x1B;
    register8_t reserved_0x1C;
    register8_t reserved_0x1D;
    register8_t reserved_0x1E;
    register8_t reserved_0x1F;
    register8_t ADCACAL0;  /* ADCA Calibration Byte 0 */
    register8_t ADCACAL1;  /* ADCA Calibration Byte 1 */
    register8_t reserved_0x22;
    register8_t reserved_0x23;
    register8_t ADCBCAL0;  /* ADCB Calibration Byte 0 */
    register8_t ADCBCAL1;  /* ADCB Calibration Byte 1 */
    register8_t reserved_0x26;
    register8_t reserved_0x27;
    register8_t reserved_0x28;
    register8_t reserved_0x29;
    register8_t reserved_0x2A;
    register8_t reserved_0x2B;
    register8_t reserved_0x2C;
    register8_t reserved_0x2D;
    register8_t TEMPSENSE0;  /* Temperature Sensor Calibration Byte 0 */
    register8_t TEMPSENSE1;  /* Temperature Sensor Calibration Byte 0 */
    register8_t DACAOFFCAL;  /* DACA Calibration Byte 0 */
    register8_t DACACAINCAL;  /* DACA Calibration Byte 1 */
    register8_t DACBOFFCAL;  /* DACB Calibration Byte 0 */
    register8_t DACBGAINCAL;  /* DACB Calibration Byte 1 */
    register8_t reserved_0x34;
    register8_t reserved_0x35;
    register8_t reserved_0x36;
    register8_t reserved_0x37;
    register8_t reserved_0x38;
    register8_t reserved_0x39;
    register8_t reserved_0x3A;
    register8_t reserved_0x3B;
    register8_t reserved_0x3C;
    register8_t reserved_0x3D;
    register8_t reserved_0x3E;
} NVM_PROD_SIGNATURES_t;
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

In all my samples, these values area laways 0x444!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

early revisions (xmega board) were not calibrated, thus 0xff
later revisions have a "best guess" middle value (=0x444), this is the middle calibration value for each of the first three adc stages.
0x444 will already improve adc performance
further test improvement with indiviuall chip calibration will then improve again 1-2LSBs

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm aware of the ADC jitter problem. If 8 or 16 readings are averaged, does it yield 10 bit precision? Are there other known problems?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Lots of them! The reference voltage cannot be 3.3V, in the xmega32a4 it must be around 2V. The linearity is a kind of a joke. In unsigned mode, single-ended, you must connect a pin to GND in order to be alble to calculate a variable offset.