English
Language : 

EVAL-AD5933EBZ Datasheet, PDF (19/32 Pages) Analog Devices – Evaluation Board for the 1 MSPS 12-Bit Impedance Converter Network Analyzer
Preliminary Technical Data
EVAL-AD5933EB
RealData = RealData - 65536
End If
ImagineryDataUpper = PortRead(&HD, &H96)
ImagineryDataLower = PortRead(&HD, &H97)
ImagineryData = ImagineryDataLower + (ImagineryDataUpper * 256)
'The imaginary data is stored in a 16 bit 2's complement format.
'In order to use this data it must be converted from 2's complement to decimal format
If ImagineryData <= &H7FFF Then
' Positive Data.
Else
' Negative
'
ImagineryData = ImagineryData And &H7FFF
ImagineryData = ImagineryData - 65536
End If
‘-----------------Calculate the Impedance and Phase of the data at this frequency sweep point -----------
Magnitude = ((RealData ^ 2) + (ImagineryData ^ 2)) ^ 0.5
'the next section calculates the phase of the dft real and imaginary components
‘phase_sweep calculates the phase of the sweep data.
sweep_phase = (phase_sweep(ImagineryData, RealData) - calibration_phase_mid_point)
GainFactor = xx ‘this is determined at calibration.see gain factor section and Datasheet.
Impedance = 1 / (Magnitude * GainFactor)
' Write Data to each global array.
MagnitudeArray(IndexArray) = Impedance
PhaseArray(IndexArray) = sweep_phase
ImagineryDataArray(IndexArray) = ImagineryData
code(IndexArray) = Magnitude
RealDataArray(IndexArray) = RealData
Increment = Increment - 1 ' increment was set to number of increments of sweep at the start
FrequencyPoints(IndexArray) = Frequency
Frequency = Frequency + FrequencyIncrements ' holds the current value of the sweep freq
IndexArray = IndexArray + 1
------------- Check to see if sweep complete ----------------------
ReadbackStatusRegister = PortRead (&HD, &H8F)
ReadbackStatusRegister = ReadbackStatusRegister And &H4 ' mask off bit D2
'Increment to next frequency point Frequency
WritetToControlRegister &H80, &H30
Loop
‘--------------------- END OF SWEEP: Place device into POWERDOWN mode------------------------------------
'Enter Powerdown Mode,Set Bits D15,D13 in Control Register.
WritetToPart &H80, &HA0
END SUB
‘--------------------------------------------------------------------------------------------------------
‘The programmed sweep is now complete and the impedance and phase data is available to read in the two
‘arrays MagnitudeArray() = Impedance and PhaseArray() = phase.
sweepErrorMsg:
End Sub
MsgBox "Error completing sweep check values"
‘The programmed sweep is now complete and the impedance and phase data is available to read in the two
‘arrays MagnitudeArray() = Impedance and PhaseArray() = phase.
Rev. PrC | Page 19 of 32