Search the Community
Showing results for tags 'signal'.
Found 2 results
Hi, I am new to the Digital Discovery I am capturing data with the SDK and would like to get the data of each individual DIN pin separately instead of together in the same buffer. My setup: Signals coming in from DIN0 and DIN2. Code is given below. What I would like to do is add DIN3 as clk and get the data for that signal in a separate buffer. Currently the data for both signals comes in as combined and I have not been able to find a way to capture it separately in the SDK. This can however be done with Waveforms2015 and I am trying to mimic that. If I have to use a DIO as clk input, that would be fine too. hzSys = c_double() dwf.FDwfDigitalOutInternalClockInfo(hdwf, byref(hzSys)) divider_value = c_uint(int(hzSys.value/1e3)) pin_24_value = createdatavalue([0x01,0x03,0x07,0x0f,0x1f,0x3f,0x7f]) dwf.FDwfDigitalOutEnableSet(hdwf, c_int(0), c_int(1)) dwf.FDwfDigitalOutTypeSet(hdwf, c_int(0), DwfDigitalOutTypeCustom) dwf.FDwfDigitalOutDividerSet(hdwf, c_int(0), divider_value) dwf.FDwfDigitalOutDataSet(hdwf, c_int(0), byref(pin_24_value), 8*7) #pin_25_value = createdatavalue([0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa]) pin_25_value = createdatavalue([0x00,0x00,0x00,0xff,0xff,0xff,0xff]) dwf.FDwfDigitalOutEnableSet(hdwf, c_int(1), c_int(1)) dwf.FDwfDigitalOutTypeSet(hdwf, c_int(1), DwfDigitalOutTypeCustom) dwf.FDwfDigitalOutDividerSet(hdwf, c_int(1), divider_value) dwf.FDwfDigitalOutDataSet(hdwf, c_int(1), byref(pin_25_value), 8*7) dwf.FDwfDigitalOutConfigure(hdwf, c_int(1)) sts = c_byte() dwf.FDwfDigitalInDividerSet(hdwf, c_int(10000)) dwf.FDwfDigitalInSampleFormatSet(hdwf, c_int(16)) nSamples = 8000 rgwSamples = (c_uint16*nSamples)() dwf.FDwfDigitalInBufferSizeSet(hdwf, c_int(nSamples)) dwf.FDwfDigitalInTriggerSourceSet(hdwf, c_ubyte(3)) # trigsrcDetectorDigitalIn dwf.FDwfDigitalInTriggerPositionSet(hdwf, c_int(nSamples)) dwf.FDwfDigitalInTriggerSet(hdwf, c_int(0), c_int(0), c_int(1<<1), c_int(0)) # DIO2 rising edge dwf.FDwfDigitalInAcquisitionModeSet(hdwf, acqmodeRecord) dwf.FDwfDigitalInConfigure(hdwf, c_bool(0), c_bool(1)) print (" waiting to finish") cAvailable = c_int() cLost = c_int() cCorrupted = c_int() cSamples = 0 fLost = 0 fCorrupted = 0 while cSamples < nSamples: dwf.FDwfDigitalInStatus(hdwf, c_int(1), byref(sts)) if cSamples == 0 and (sts == DwfStateConfig or sts == DwfStatePrefill or sts == DwfStateArmed) : # acquisition not yet started. continue dwf.FDwfDigitalInStatusRecord(hdwf, byref(cAvailable), byref(cLost), byref(cCorrupted)) cSamples += cLost.value if cLost.value : fLost = 1 if cCorrupted.value : fCorrupted = 1 if cAvailable.value==0 : continue if cSamples+cAvailable.value > nSamples : cAvailable = c_int(nSamples-cSamples) # get samples dwf.FDwfDigitalInStatusData(hdwf, byref(rgwSamples, 2*cSamples), c_int(2*cAvailable.value)) cSamples += cAvailable.value print ("Acquisition finished") dwf.FDwfDeviceCloseAll() print ("Recording finished") if fLost: print ("Samples were lost! Reduce sample rate") if cCorrupted: print ("Samples could be corrupted! Reduce sample rate") f = open("record.csv", "w") for v in rgwSamples: f.write("%s\n" % v) f.close()
Hello All, I am trying to acquire a waveform from one of my terminal of the ESP8266 microcontroller (GPIO0). I should be expecting a signal from the crystal at this terminal which is oscillating at 26 MHz. Can anybody let me know the correct settings to acquire the signal of 26 Mhz? The following are the steps that I performed: 1. Go to settings--> Device Manager --> select 2x 16K scope 2. Then click the settings (gear symbol) on the time settings box on the right side of the window 3. Here, I select Range Mode = Division Mode, Rate = 100 MHz, Samples = Default I have attached the snip shots below. The signal intended to measure should be in 26 MHz. It usually says samples lost- reduce the sample rate. Why does it say that? Please let me know the correct settings to measure this signal. The overall objective of measuring the time response on this terminal and maybe the frequency response at this terminal is to figure out which component in my custom board is behaving differently from the other boards which are tested as okay. Please let me know if there is a way to do it using Analog Discovery.