AnsweredAssumed Answered

AD5933 Repeat Frequency constant values

Question asked by eastercountry on May 23, 2016
Latest reply on May 25, 2016 by musach

Hy,

 

i want to measure an impedance with a constant frequency, without a sweep. I use a MSP430F5659 and the analog libray.

In the first part I initialise the AD5933 with a start frequency,inc frequency, num of increments and start the sweep. In the timer controlled second part I want to repeat the frequency measurement by issuing a repeat frequency command followed by reading the real and imaginary data like in datasheet figure 28.

 

The real and imaginary part are constant over 10k Samples.(~39kOhm; real:const 29437 ; imag:const -16624)

I played arround with range and gain, time cycles and some delays. I have also tried to restart the frequency sweep every sample but its to slow and the same problem.

Any ideas?

 

Code:

 

AD5933_ConfigSweep(currentFreq,10,10);

//    AD5933_SetTimeCycles(100);

//   AD5933_SetRangeAndGain(AD5933_RANGE_1000mVpp,AD5933_GAIN_X1);

    AD5933_StartSweep();

 

/***************************************************************************//**

* @brief Repeat frequency and reads the real and the imaginary data

*

* @param realData           - Pointer to realData

* @param imagData        - Pointer to imagData

*

*******************************************************************************/

void AD5933_Measure(short* realData, short* imagData)

{

 

    unsigned char status    = 0;

 

    AD5933_StandbyMode();

 

    AD5933_SetRegisterValue(AD5933_REG_CONTROL_HB,

                            AD5933_CONTROL_FUNCTION(AD5933_FUNCTION_REPEAT_FREQ) |

                            AD5933_CONTROL_RANGE(currentRange) |

                            AD5933_CONTROL_PGA_GAIN(currentGain),

                            1);

    status = 0;

 

    while((status & AD5933_STAT_DATA_VALID) == 0)

    {

        status = AD5933_GetRegisterValue(AD5933_REG_STATUS,1);

        delay_us_16MHz(10);

    }

 

    *realData = AD5933_GetRegisterValue(AD5933_REG_REAL_DATA,2);

    delay_us_16MHz(100);

 

    *imagData = AD5933_GetRegisterValue(AD5933_REG_IMAG_DATA,2);

    delay_us_16MHz(100);

 

}

 

regards Dennis

Outcomes