AnsweredAssumed Answered

ImpedanceMeasurement_2Wire Example

Question asked by gimbal on Feb 25, 2018
Latest reply on Feb 28, 2018 by gimbal

Hi all, I'm building my application to sweep across a frequency range based on the ImpedanceMeasurement_2Wire example. There a few things that are not 100% clear to me. 


1. In order to perform measurement across frequency I've done the measurement in a loop and recalculate the FCW instead of using the define like the sample:

for (ii = lower; ii < upper; ii++)


/* Update FCW in the sequence */
fcw = ((uint32_t)(((uint64_t)frequencies[ii] << 26) / 16000000 + 0.5));
seq_afe_acmeas2wire[3] = SEQ_MMR_WRITE(REG_AFE_AFE_WG_FCW, fcw);


/* Update sine amplitude in the sequence */


/* Recalculate CRC in software for the AC measurement, because we changed */
adi_AFE_EnableSoftwareCRC(hDevice, true);


/* Perform the Impedance measurement */
if (adi_AFE_RunSequence(hDevice, seq_afe_acmeas2wire, (uint16_t *)dft_results, DFT_RESULTS_COUNT))
FAIL("Impedance Measurement");




Does this look right, or am I missing something else?


2. I'm not entirely clear on how the output amplitude is set. Does the sequencer just take the max amplitude as an input and then automatically oscillates to that value? In this case does it make sense that I can pull the SINE_AMPLITUDE instruction outside the for loop above?


3. Am I correct in my understanding that since the attenuator is enabled in this example, we could set the VPEAK define to a maximum of (600mV/40) or 15?