AD5940 LPDAC Calibration & Excitation Signal


I have a few questions regarding the AD5940.

1) LPDAC calibration: Can you give me more information how the calculations of the parameters (bC2V_DACXB, kC2V_DACxB) are done in the function "AD5940_LPDACCal"? For example, it is unclear to me where the factor 1e3f/32768*1.835f/1.82f comes from.

2) LPDAC calibration: I have a deviation from the expected output for both the 6 and 12 bit output of the LPDAC. For example, with a register value (Vzero0/6bit output) of 0x00, I expect a voltage of 200mV according to the datasheet, but I only measure 190mV. I was hoping that the LPDAC calibration would minimize the deviation. Is there a configuration or setup to minimize these deviations/tolerances?

3) LPDAC calibration: I used the formula from the example code (ad5940.h) (Code(LSB) = kV2C_DACxB * Voltage(mV) + bV2C_DACxB) to calculate the register value for a given voltage. Again, I was able to find a discrepancy. For example, if I want to achieve a voltage of 800mV, I get a calculated register value of 0x11. However, the measured voltage at the LPDAC output is only 730mV. Probably this is related to the calculated factors from the function "AD5940_LPDACCal". Am I missing something or why do I still have deviations even after calibration?

4) Excitation signal: Is it possible to set a negative voltage between the excitation signal and the voltage at the Vzero0 pin (voltage at SE0)?

thanks in advance

  • Hi,

    1) AD5940 is factory calibrated for 1.835V internal reference voltage.

    Since the reference voltage to be given is 1.82V, correction factor is multiplied in LPDAC calibration function AD5940_LPDACCa().

    2) Are you sure there is no additional resistor in the measurement path?

    3) You may check out the code2 voltage conversion function below:


      @brief Convert ADC Code to voltage.

      @param ADCPga: The ADC PGA used for this result.

      @param code: ADC code.

      @param VRef1p82: the actual 1.82V reference voltage.

      @return Voltage in volt.


    float AD5940_ADCCode2Volt(uint32_t code, uint32_t ADCPga, float VRef1p82)


      float kFactor = 1.835/1.82;

      float fVolt = 0.0;

      float tmp = 0;

      tmp = (int32_t)code - 32768;



      case ADCPGA_1:


      case ADCPGA_1P5:

        tmp /= 1.5f;


      case ADCPGA_2:

        tmp /= 2.0f;


      case ADCPGA_4:

        tmp /= 4.0f;


      case ADCPGA_9:

        tmp /= 9.0f;




      fVolt = tmp*VRef1p82/32768*kFactor;

      return fVolt;


    4) With VZero chosen in the middle, excitation voltage can swing in both positive and negative directions w.r.t. VZero.

  • Thank you for your quick response!

    2) What exactly do you mean with additional resistance? I have internally disconnected everything except the HSTIA. The positive input of the HSTIA is connected to Vzero0 and the negative input is connected to SE0. Then I directly measured the Vzero0 pin output and at the SE0 pin with an oscilloscope.

    3) As I understood, you can use the function "AD5940_ADCCode2Volt" to convert an ADC code to the corresponding voltage. However, my question was about the LPDAC. I want to set a specific voltage on the LPDAC's 6/12bit output and need a formula/function that will return the corresponding register value and include the calibration parameters (kV2C_DACxB, bV2C_DACxB).

    4) Figure 26 (AD5940 datasheet) shows a sinusoidal voltage with a positive offset (VBias0-Vzero0). Is it also possible to set a negative DC voltage (negative offset) in respect to Vzero0 for the generated sinusoidal voltage?

  • Hi,

    1) There is a loading effect between the 12 bit DAC and the 6 Bit DAC.

    Is the part below added in your code?

    12BITCODE = LPDACDAT0 [11:0];

    6BITCODE = LPDACDAT0 [17:12];

    if (12BITCODE < (6BITCODE *64))

    LPDACDAT [11:0] = (12BITCODE – 1); 

    2) The LPDAC transfer function is in page 31 of AD5940 datasheet:

    When the 12-bit output is less than the 6-bit output,

    12-Bit DAC Output Voltage = 0.2 V + (LPDACDAT0, Bits[11:0] × 12-BIT_LSB_DAC)

    6-Bit DAC Output Voltage = 0.2 V + (LPDACDAT0, Bits[17:12] × 6-BIT_LSB_DAC) – 12-BIT_LSB_DAC)

    When the 12-bit output is ≥ the 6-bit output,

    12-Bit DAC Output Voltage = 0.2 V + (LPDACDAT0, Bits[11:0] × 12-BIT_LSB_DAC)

    6-Bit DAC Output Voltage = 0.2 V + (LPDACDAT0, Bits[17:12] × 6-BIT_LSB_DAC)

    3) (VBIAS - VZERO) can be from  - 600mV upto +600mV.