Source Code For Impedance Sweeps - Analog Devices EVAL-AD5934EB Preliminary Technical Data

Evaluation board for the 250 ksps 12-bit impedance converter network analyzer
Table of Contents

Advertisement

Preliminary Technical Data

SOURCE CODE FOR IMPEDANCE SWEEPS

This section outlines the evaluation board code structure required
to set up the AD5934 frequency sweep. The sweep flow outline is
shown in Figure 26. Each section of the flowchart will be explained
with the help of Visual Basic code extracts. The evaluation board
source code (Visual Basic) is available upon request from the
Analog Devices
Technical Support
(C code), which is downloaded to the USB microcontroller
connected to the AD5934, implements the low level I
control (that is, read and write vendor requests).
The Evaluation Board Source Code Extract section provides an
example of how to program a single frequency sweep, starting at
PROGRAM FREQUENCY SWEEP PARAMETERS
INTO RELEVANT REGISTERS.
(1) START FREQUENCY REGISTER
(2) NUMBER OF INCREMENTS REGISTER
(3) FREQUENCY INCREMENT REGISTER
PLACE THE AD5934 INTO STANDBY MODE.
PROGRAM INITIALIZE WITH START
FREQUENCY COMMAND TO THE CONTROL
REGISTER.
PROGRAM START FREQUENCY SWEEP
COMMAND IN THE CONTROL REGISTER AFTER
A SUFFICIENT AMOUNT OF SETTLING TIME
HAS ELAPSED.
POLL STATUS REGISTER TO CHECK IF
THE DFT CONVERSION IS COMPLETE.
NO
YES
READ VALUES FROM REAL AND
IMAGINARY DATA REGISTER.
YES
POLL STATUS REGISTER TO CHECK IF
FREQUENCY SWEEP IS COMPLETE.
YES
PROGRAM THE AD5934
INTO POWER-DOWN MODE.
Center. The firmware code
2
C signal
PROGRAM THE INCREMENT FREQUENCY OR
THE REPEAT FREQUENCY COMMAND TO THE
CONTROL REGISTER.
NO
Figure 26. Sweep Flowchart
30 kHz, with a frequency step of 10 Hz and 150 points in the
sweep. The code assumes that a 16 MHz clock signal is connected
to Pin 8 (the MCLK pin) of the AD5934. The impedance range
being tested is from 90 kΩ to 110 kΩ. The gain factor is calculated
at the midpoint of the frequency sweep, that is, 30.750 kHz. The
calibration is carried out with a 100 kΩ resistor connected between
VOUT and VIN. The feedback resistor is 100 kΩ.
The first step in Figure 26 is to program the three sweep
parameters that are necessary to define the frequency sweep
(that is, the start frequency, the frequency increment, and the
number of frequency increments in the sweep). Refer to the
AD5934
data sheet for more details.
Rev. PrC | Page 15 of 32
EVAL-AD5934EB

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the EVAL-AD5934EB and is the answer not in the manual?

Table of Contents