My project involves exciting an external sensor with the E5's DAC providing an amp'd (5KHz Square Wave, 0-~15V) output and reading back an AC coupled, filtered and scaled 0-2.5VDC input to the A/D. I use a clean precision +2.5V external reference for both the DAC and ADC. My external calibration routine drives the A/D incrementally from 0x000 up to 0xFFF(FS) while reading the A/D conversion to see when it saturates (0xFFF result). Then the DAC value becomes my "max" value to excite the sensor (the min being zero). The circuit works great for the application, but I'm trying to figure a good way to "auto-calibrate" the DAC and ADC internally so they track together and then perform the external calibration. Seems simple enough, since the E5 can convert the DAC output in "internal" mode. However, when I switch the A/D to internally convert the DAC DC output, both using the 2.5V ref, all the A/D results hover around mid-way; 0x800'ish. (0x8C1 @0x000 -> 0x935 @0xFFF). By the way, I use single-ended unsigned mode.
Anyone done anything similar with an XMEGA with the A/D converting it's own DAC output internally with success?