-
Posts
6,662 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Gallery
Posts posted by attila
-
-
Hi @SIB-V2
1. The first thing I notice with I2C is that clock stretching is enabled and this uses additional DIO lines.
Disable clock stretching "Protocol.I2C.ClockStretching.value = 0" or use DIO 10 or above for your Reset signal. -
-
Hi @SIB-V2
The example script for PMOD ACL2 is there since many years. I just opened an app version from January 2018.
Do you have any problem using it ?
-
Hi @reddish
We try to have two official releases a year, in spring and in autumn.
This may be pushed by other works, new products...I'll notify you before the release.
-
Hi @Resul
1. To improve the resolution you could use the 2nd device configuration to have 16k sample buffer compared to the 8k in the 1st, default.
2. You may see noise around 1.5V because the reading enters in limitation. There is no additional filtering in the application.
In the SDK the offset for both channels is set to the offset level, in the application by default only channel 1 set to offset.2.a Try changing the amplitude.
2.b Try setting the channel 2 offset to 0V or configure the Wavegen and Scope C1 offset manually:... FDwfAnalogImpedanceConfigure(hdwf, 1) // general configuration FDwfAnalogInChannelOffsetSet(hdwf, 1, 0.0) // Scope C2 offset for: FDwfAnalogOutNodeOffsetSet(hdwf, 0, 0, vOff) // change Wavegen offset FDwfAnalogOutConfigure(hdwf, 0, 1) // start wavegen FDwfAnalogInChannelOffsetSet(hdwf, 0, vOff) // Scope C1 offset FDwfAnalogInConfigure(hdwf, 0, 1) // start Scope while: FDwfAnalogImpedanceStatus(... FDwfAnalogImpedanceStatusMeasure(...
3. The AD2 Wavegen can output -5V to +5V
You could eventually use the negative supply to have a -5V reference and do 1 to +9V sweep range, then use the positive supply to have +5V reference and do -1 to -9V, or -4V for 0 to +8V and +4V for 0 to -8V. Such 8V range of offset because you need about 1V for the signal.Edit: correcting wavegen offset function and scope offset sign
-
-
-
Hi @GroupPower
The device can perform simple average filter but advanced filtering is available in the application.
You could capture large amount of data with Recording mode:
- AD2 up to about 1-2MHz limited by USB bandwidth
- ADP3450 up to 128M @ 125MHz on 1 channel or 32M @ 31.25MHz on 4 channels. -
Hi @Resul
There is no API for the CC/CV mode. These can be implemented in custom app similar to the example scripts in the WF app/ Imedance/ Mode: Custom, Custom Amplitude
See the dwf.h for Vrms...
The cs and vb will be updated in next version.public const int DwfAnalogImpedanceVrms = 14; // Vrms public const int DwfAnalogImpedanceVreal = 15; // V real public const int DwfAnalogImpedanceVimag = 16; // V imag public const int DwfAnalogImpedanceIrms = 17; // Irms public const int DwfAnalogImpedanceIreal = 18; // I real public const int DwfAnalogImpedanceIimag = 19; // I imag
-
Hi @JEK
1. The most accurate measurement would be by connecting EFG/Trig to the other AD2 Scope channel and triggering on rising edge of this.
2. You could connect EFG/Trig to AD2 Trigger and trigger on this but in this case you won't see the trigger graphically represented, only as T0
3. You could also connect EFG/Trig to AD2 DIO and use Scope in mixed mode by adding DIO channels and trigger on this. -
Hi @tr53
I don't know what could be wrong.
For the next software version I've changed to use Qt's file dialog. -
Not implicitly supported.
It could be implemented using Pattern Generator ROM Logic but this would be a bit tricky work.
-
The beta versions add new features and fixes. These have minimal testing but I think functionality is rarely broken.
The official releases a rare, undergoes more testing and it should be more reliable. -
The FDwfDigitalSpiWriteRead performs bidirectional transfer, sending out data on MOSI and receiving on MISO at the same time.
The FDwfDigitalSpiWrite and FDwfDigitalSpiRead performs only one task at a time. -
Hi @m72
1. It is added for the next version.
2. You could use workspace which also stores the used device and configuration.
In script use "Device.configuration" which returns the 0 based index of the current configuration, like 3 for 4th3. The "start from" will be fixed in the next software version.
Thank you for the observations
-
The backward compatibility is solved in newer beta versions:
https://forum.digilentinc.com/topic/8908-waveforms-beta-download/ -
Hi @logicmax
The following example starts by generating a sawtooth then switches to square signal using FDwfAnalogOutNodeDataSet.
Generated by AD2 and captured with ADP.import sys import time from ctypes import * if sys.platform.startswith("win"): dwf = cdll.dwf elif sys.platform.startswith("darwin"): dwf = cdll.LoadLibrary("/Library/Frameworks/dwf.framework/dwf") else: dwf = cdll.LoadLibrary("libdwf.so") hdwf = c_int() channel = c_int(0) # AWG 1 print("Opening first device...") #dwf.FDwfEnum(0,0) dwf.FDwfDeviceOpen(c_int(-1), byref(hdwf)) if hdwf.value == 0: print("Failed to open device") szerr = create_string_buffer(512) dwf.FDwfGetLastErrorMsg(szerr) print(str(szerr.value)) quit() dwf.FDwfDeviceAutoConfigureSet(hdwf, c_int(0)) dwf.FDwfAnalogOutNodeEnableSet(hdwf, channel, 0, c_bool(True)) dwf.FDwfAnalogOutNodeFunctionSet(hdwf, channel, 0, c_int(31)) #funcPlay dwf.FDwfAnalogOutNodeAmplitudeSet(hdwf, channel, 0, c_double(0.8)) cBuffer = c_int(0) dwf.FDwfAnalogOutNodeDataInfo(hdwf, channel, 0, 0, byref(cBuffer)) dwf.FDwfAnalogOutNodeFrequencySet(hdwf, channel, 0, c_double(1e3*cBuffer.value)) # 1kHz to sample rate rgdSamples = (c_double*cBuffer.value)() for i in range(0, cBuffer.value): # saw rgdSamples[i] = 2.0*i/cBuffer.value-1.0 dwf.FDwfAnalogOutNodeDataSet(hdwf, channel, 0, rgdSamples, cBuffer) dwf.FDwfAnalogOutConfigure(hdwf, channel, c_bool(True)) # start print("sawtooth started") time.sleep(5) for i in range(0, cBuffer.value): #square if i<cBuffer.value/2: rgdSamples[i] = -1 else: rgdSamples[i] = 1 dwf.FDwfAnalogOutNodePlayData(hdwf, channel, 0, rgdSamples, cBuffer) print("change to square") time.sleep(5) print("done") dwf.FDwfAnalogOutReset(hdwf, channel) dwf.FDwfDeviceClose(hdwf)
-
Hi @logicmax
1. If you are using the Play mode the DataSet (prefill) and Configure (start) needs to be called only in the initialization. The following data chunks sent with PlayData, see AnalogOut_Play.py
2. If you are generating a periodic signal (FGen) and want to change the signal or other parameters:
FDwfDeviceOpen(...)
FDwfDeviceAutoConfigureSet(hdwf, 0); // the device will be configured only when calling FDwf###Configure
...
FDwfAnalogOutConfigure(hdwf, channel, 1); // start Wavegen
loop:
...
FDwfAnalogOutOffsetSet(...)
FDwfAnalogOutNodeDataSet(...)
FDwfAnalogOutConfigure(hdwf, channel, 3); // apply, do not change state3. A non-intended usage of Play mode, if you only want to change the generated periodic signal could be using the FDwfAnalogOutNodePlayData.
With this method the full device buffer size of data should be sent and frequency set as sample rate.
This method should be faster than 2. since only the data is sent, other configurations are not applied.2-3 Depending on the generator rate you may notice altering samples at the output, from the previous and new signal. This due to the concurrence between write to device buffer and reading from this to the output.
-
Hi @ees4all
Wavegen (+-V) -> 100nF -> Scope 1 | DUT -> Scope 2 -> RefRes-> GND
or
Wavegen (3.7V+-V) -> Scope 1 | DUT -> Scope 2 -> RefRes-> GND -
Hi @blipton
The Digital IOs can be used as OC/OD but on Analog Discovery the 0/3.3V protection circuit could draw significant current and the 5V signal may drop.
The Wavegen outputs have no high impedance option but you could simulate (generate) 0/5V signals with these.
Or you could use DIOs with external level shifter. -
Hi @longboard
Yes, the procedure is the same.
-
Hi @Sebastian C
Use:
# trigger detector mask: low & hight & ( rising | falling )
dwf.FDwfDigitalInTriggerSet(self.hdwf, c_int(0), c_int(0), c_int(1<<self.idxCS), c_int(1<<self.idxCS))The FDwfDigitalSpi# functions are for master. For spy purpose it is suffice to use the FDwfDigitalIn functions, see: WF SDK/ samples/ py/ DigitalIn_Spi_Spy.py
-
Hi @Resul
I think you could use the FDwfAnalogImpedanceStatusInput example: AnalogNetwork_Analyzer.py
dwf.FDwfAnalogImpedanceStatusInput(hdwf, c_int(0), byref(gain1), 0) # relative to FDwfAnalogImpedanceAmplitudeSet Amplitude/C1
dwf.FDwfAnalogImpedanceStatusInput(hdwf, c_int(1), byref(gain2), byref(phase2)) # relative to Channel 1, C1/C#For mode 0 (W1-C1-DUT-C2-R-GND) or 8 (AD IA adapter) :
gain1 = Amp/VrmsC1
gain2 = VrmsC1/VrmsC2VrmsC1 = A/gain1
VrmsC2 = A/gain1/gain2Vrms = VrmsC1-VrmsC2
Irms = VrmsC2/ResEdit:
Next software version will add such measurement options for the API. -
Hi @Camarillo
Yes.
The scope inputs are rated/protected up to +-50V relative to device ground.
The range is 50V, with inputs between +-50V and offset -25V..+25V
Impedance Analyzer Adapter Options Menu for Offset Sweep
in Test and Measurement
Posted
Hi @Resul
I managed to reproduce the issue... working on it...