Search the Community

Showing results for tags 'digital discovery'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • News
    • New Users Introduction
    • Announcements
  • Digilent Technical Forums
    • FPGA
    • Test and Measurement
    • Measurement Computing (MCC)
    • Add-on Boards
    • Digilent Microcontroller Boards
    • Non-Digilent Microcontrollers
    • LabVIEW
    • FRC
    • Other
  • General Discussion
    • Project Vault
    • Learn
    • Suggestions & Feedback
    • Buy, Sell, Trade
    • Sales Questions
    • Off Topic
    • Educators
    • Technical Based Off-Topic Discussions
    • Archived

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

  1. Hi. I am trying to write a script that enables two DIO pins to be used as a 30 MHz clock source(seems that DD only supports frequencies like 50M, 25M, 12.5M) and a piece-wise linear enable signal & thirteen DIN pins to get a timing signal (negative edge will be used for logic analyzer trigger) and twelve digital output signals from DUT. I referred to Waveforms help manual and help page, but examples utilizing logic analyzer and pattern generator were not available. I wrote a practice code, but Patterns feature only works when I manually add corresponding DIO pin to Patterns window in GUI. Otherwise, output log says, 'TypeError: Result of expression 'Patterns1.Channels.DIO33' [undefined] is not an object.' Also, I am also having hard time setting logic analyzer details with a script. Which properties should be defined in the script for activating thirteen DIN pins is not clear. Could someone advise me how to write a proper script based on the following block diagram and my code? Thanks in advance! Best, J.J. Code: clear(); print("Fresh start"); if(!('Logic1' in this) || !('Patterns1' in this)) throw "Please open a Logic analyzer and a pattern generator instrument"; // patterns window should be opended already // required signal IO pin should be assigned in GUI. if not, error evoked: Patterns1.Channels.DIO## 'undefined' is not an object // PP: push-pull (0 and 1); OD: open drain (0 and Z); OS: open source (Z and 1); TS: three state (0 and 1 and Z) // pins used in patterns window need to be created in GUI. failed to activate ceratin pins Patterns1.Channels.DIO33.setEnable(); Patterns1.Channels.DIO33.Output.text = "PP"; // output type is push-pull (allowed pattern values are 0 and 1) Patterns1.Channels.DIO33.Type.text = "Clock"; Patterns1.Channels.DIO33.Frequency.value = 25E6; // 20 MHz clock (scientific notation works) Patterns1.run(); Logic1.Trigger.Trigger.text = "Auto"; //Logic1.Trigger.Clock.text = "Internal"; Logic1.Channels.DIN23.Trigger.text = "Fall"; // falling edge of CLK_S will be the sampling timing print("End of code.");
  2. Hi, I have three Digital Discovery boards. I want to use them in logic analysis mode to read simultaneously 20 channels. However, I don't understand how to synchronize them. Also, I want them to start acquisition when a rising edge occurs on any of the inputs. Could you please provide a part of the code for that?
  3. I've been trying (unsuccessfully) to set up a Digital Discovery to trigger when multiple conditions are met. I've tried using the Pulse options but I can't see a way of linking multiple signals so I guess I need to use a script. Basically, I want to detect a 960ns pulse on DIN6 and, after it has been detected, trigger if any of four signals (DIN 1, 2, 4 or 5) fails to transition high to low within +/- 30ms. Could someone point me to a sample script that I can use as a starting point to do this?
  4. I have a Digital Discovery, and can use the SDK to load a 32kSample pattern to be played back as described in the reference manual. The SDK also mentions using Play Mode, and the examples refer to what appear to be much longer buffer sizes. Is there any documentation about how Play Mode works, what sample rates can be achieved, etc? Can I get the full amount of digital capture at the same time? Does it depend on available USB bandwidth to the host? While I can find many references to it being available, I can't find a description of what its capabilities are.
  5. As hinted at in: I am seeing an issue where a pattern that is sent to a Digital Discovery for use with Play mode occasionally ends up being corrupted, with a short section of it being repeated over and over. I think this only occurs when also capturing digital signals at higher sampling rates. The attached code is loosely based on DigitalDiscovery_PlayRecord.py, but reordered slightly and switched to use acqmodeSingle1. Viewing the output on an external logic analyser, I can see that it outputs the expected pattern. However, when I increase hzRecord to 400e6, I occasionally get the partial-repeat case - although the total length of the playback is the same as expected. Is anyone seen this before, and able to suggest what I might be doing wrong? test_play_2.py
  6. Hello, In Waveform GUI Run and Stop gives continuous logic data from the device. But i am not able to figure out how to mimic this feature using waveform sdk api and python. And i also don't know how to set Base 1s/div and position to 1s in python Thank You
  7. Hi, I'm using the Waveform SDK with Python and I'm not able to get the DD to start the pattern output with a digital input as trigger. I have tried to look into the different examples in the SDK, but none of them seem to fit this exact use case. Use case: Preparation: Generate a pattern Run time: Get a rising edge on a specified I/O pin (e.g. DIO-25) Wait an amount of time using FDwfDigitalOutWaitSet Play pattern on a specified I/O pin (e.g. DIO-24) Do you have a code snippet which fits this use case? Best, Hakon.
  8. Hi, I have been using python to program the pattern generator of digilent digital discovery but when I am checking for the frequency of the generated output it is limited to 6KHz. I am writing here to know if there is anyway to use the device to its full potential like say 50 MHz? Thanks in advance. Regards, Limitha
  9. I seem to be decoding 1-Wire UART successfully (more by luck than skill). I have stream of Data how do I search through that data? How do I convert the hex code into ASCII? Thanks.
  10. Hi, I wonder if it's possible to make my own protocol analyzer to use with the 'Digital Discovery', preferable using C#
  11. Hello, I read the following lines in the documentation of some other USB DAQ: As I have no real electronics background I'm asking myself if such a statement is also valid for Digital Discovery or Analog Discovery 2 input pins and what state do these pins have in powered off state?
  12. Hello, to load data into a serial DAC, a separate latch pulse is needed at the end of an SPI transfer. I tried to achieve this using a Custom SPI protocol and adding control for an extra output pin. According to help file: I modified an example script, but adding DIO.Set(31, 1) results in "Data transfer error", and WaveForms has to be restarted to recover from it. // Pmod DA1 - AD7303 // DIO.Set(31,1); // <-- uncommenting this line results in "Data transfer error", need to restart WaveForms to recover for(var i = 0; i < 50 & wait(0.1); i++){ var va = 128+sin(2*PI*i/50)*127; var vb = 128+cos(2*PI*i/50)*127; Start(); Write(16, 0x0100 | (va & 0xFF)); // Update DAC A input register from shift register Stop(); Start(); Write(16, 0x2400 | (vb & 0xFF) ); // Load DAC B input register from shift register and update both DAC A and DAC B DAC registers outputs. Stop(); // DIO.Set(31,0); // <-- uncommenting this line results in "Data transfer error", need to restart WaveForms to recover wait(0.0001); // DIO.Set(31,1); // <-- uncommenting this line results in "Data transfer error", need to restart WaveForms to recover } return "done" Any suggestions to generate the desired signal? Any help is appreciated!
  13. I'm on the hunt for a logic analyzer to debug digital protocols. I plan to use it to debug high speed SPI busses (up to 50-80MHz) and USB 2.0 FS (I want to write my own USB stack for a STM32 as a learning experience). My eye is particularly drawn to the Digital Discovery, as for the price it has very high sample rate. I still have to buy a LA though, as I'm still scouting around what works best for me. Therefore, I installed the Waveforms software as a demo, but did not find the USB protocol in there. Obviously it would be complex to write a custom decoder while simultaneously also writing (and learning) a USB stack. However I do know that open source packages (Sigrok) has support for it, so that makes me wonder if it's also possible to use the Digital Discovery with sigrok (e.g. directly capture within Sigrok). I had a look at the Sigrok wiki; and there is a page for the Analog Discovery 1: https://sigrok.org/wiki/Digilent_Analog_Discovery However, it says it's WIP. I cannot find any device driver in Sigrok or the github repository. So I wonder, is there any plan to add Sigrok support? If not by Digilent's efforts, is there any documentation available on how the interfacing to the device works, perhaps even at a USB level, such that it could be ported? I think it would be a huge addition to the product, as the Sigrok CLI and GUI is equipment agnostic and could be used in many test/development automation setups as well. Thanks in advance ?
  14. If I configure the SPI with mode 0 (polarity=0 and phase=0) and LSB in WaveForms SDK in the Digital Discovery or Analog Discovery 2, and I send the byte 163=0xA3=b10100011; I would see the following: Is it guaranteed that when there is a falling edge of SCLK, the MOSI takes the value just before the transition (the SCLK edge)? What I mean is; is the following image accurate:
  15. I have a device that has a single 16-bits SPI shift register (for both transmissions and receptions). It responds to falling edges of SCLK. The input of the shift register is connected to MOSI and the output to MISO, as the following figure. As the MOSI signal is input to the first flip-flop of the shift register, it should remain stable (not change) during a falling edge of SCLK, while MISO changes its value during a falling edge of SCLK. This way, MISO and MOSI signals are not synchronized. I want to communicate with this device using WaveForms SDK. Is there a way to configure the SPI communication correctly? With this I mean: is there a way of generating the SCLK and MOSI signals as shown in the figure above, and sample the MISO data in each rising edge of the SCLK? I suspect functions FDwfDigitalSpiRead16 and FDwfDigitalSpiWrite16 assume MISO and MOSI signals are synchronized; so no SPI polarity and phase configuration would work correctly.
  16. The marketing video for the digital discovery shows a script that reads the output of a vga port and outputs a document of the image. Is that script available anywhere?
  17. I am trying to interface a MEMS microphone ICS-52000 with the Digital Discovery board. The microphone outputs data using Time Domain Multiplexed (TDM) signaling. TDM is somewhat similar to I2S but without the left and right channel. The Digital Discovery board has I2S listed under Logic. I want to make a Protocol for TDM. Is it possible to use the Digital Discovery board to develop a protocol that will generate a clock signal (output) along with a word select (output) synchronous to the clock signal and then read data (input) from a connected microphone? Data would be streamed to a file. Thanks, Douglas
  18. Are there any differences between Python and C++ version of WaveForms SDK API functions with respect to execution time of the functions?
  19. Is there any way to program an interrupt when a digital input pin goes high in WaveForms SDK with Analog Discovery 2 or Digital Discovery? I want to write a code (using WaveForms SDK), with which I wait for a digital input pin to go high. After the pin goes high, I want to continue with the program. Something like the following code: # Some code while (not digitalInputPinIsHigh()): continue # Continue with the program The problem is that the pin's output is a pulse that is only high for 30 μs, so if I continuously check the digital input pin until it goes high, I think I can miss the pulse. Is there a way to program an interrupt (some code/function that is executed when the pin goes high)? Something like the following code: def ISR(): digitalInputPulseArrived = True # Some code digitalInputPulseArrived = False while (not digitalInputPulseArrived): continue # Continue with the program
  20. I am programming a Digital Discovery with WaveForms SDK (in Python) to communicate via SPI with an FPGA. The SPI comunication has 16 bit words. First, I have to send the address to read or write (the first bit of the 16 bit word indicates whether it is a read 0 or a write 1). Then, in the second 16 bit word, I read the data if it was a read operation, or I send the data if it was a write operation. I have the following code: # Imports from ctypes import * from dwfconstants import * import sys import time # Load dwf library if sys.platform.startswith("win"): dwf = cdll.LoadLibrary("dwf.dll") elif sys.platform.startswith("darwin"): dwf = cdll.LoadLibrary("/Library/Frameworks/dwf.framework/dwf") else: dwf = cdll.LoadLibrary("libdwf.so") # Open the Digital Discovery device hdwfDD = c_int() dwf.FDwfDeviceOpen(c_int(-1), byref(hdwfDD)) # Configure digital voltage to 1.8 V and system frequency to 100 MHz dwf.FDwfAnalogIOChannelNodeSet(hdwfDD, c_int(0), c_int(0), c_double(1.8)) dwf.FDwfAnalogIOChannelNodeSet(hdwfDD, c_int(0), c_int(6), c_double(100e6)) dwf.FDwfAnalogIOEnableSet(hdwfDD, c_int(True)) # Configure SPI dwf.FDwfDigitalSpiFrequencySet(hdwfDD, c_double(1e6)) # 1 MHz dwf.FDwfDigitalSpiClockSet(hdwfDD, c_int(4)) dwf.FDwfDigitalSpiDataSet(hdwfDD, c_int(0), c_int(6)) # MOSI dwf.FDwfDigitalSpiDataSet(hdwfDD, c_int(1), c_int(15)) # MISO dwf.FDwfDigitalSpiModeSet(hdwfDD, c_int(0 | (0 << 1))) # Polarity 0; Phase 0 dwf.FDwfDigitalSpiOrderSet(hdwfDD, c_int(0)) # LSB # Configure the address 1 to value 5000 time.sleep(200e-6) dwf.FDwfDigitalSpiWriteOne(hdwfDD, c_int(1), c_int(16), c_int(0x8000 | 1)) time.sleep(200e-6) dwf.FDwfDigitalSpiWriteOne(hdwfDD, c_int(1), c_int(16), c_int(5000)) # Read the value in address 1 to check if data has been set correctly time.sleep(200e-6) dwf.FDwfDigitalSpiWriteOne(hdwfDD, c_int(1), c_int(16), c_int(1)) time.sleep(200e-6) rxData = c_int() dwf.FDwfDigitalSpiReadOne(hdwfDD, c_int(1), c_int(16), byref(rxData)) All the dwf functions return 1 (including dwf.FDwfDigitalSpiWriteOne). I have also checked that the SPI writes are working with an oscilloscope. The problem is with the function dwf.FDwfDigitalSpiReadOne, that returns 0. What does this mean? Besides, when this function is executed, the Digital Discovery turns on a blue LED. What is the meaning of this blue LED? I have run the following code after the unsuccessful DigitalSpiReadOne trying to obtain an error message: szerr = create_string_buffer(512) dwf.FDwfGetLastErrorMsg(szerr) print(str(szerr.value)) # Prints: b'' But nothing is printed. I want to add that the same SPI configuration works perfectly in an Analog Discovery 2. The problem is I want the SPI to work at 1.8 V, and as far as I know, the Analog Discovery 2 only works at 3.3 V.
  21. I want to do the following with WaveForms SDK: communicate through 1.8 V SPI read 2 digital 1.8 V inputs generate a digital 1.8 V output generate a digital clock of 32768 Hz (low level 0 V and high level 1.8 V) Is this possible with a Digital Discovery or with an Analog Discovery 2 (or both)? I wanted to use an Analog Discovery 2, but I think I cannot set the digital voltage to 1.8 V (it is always 3.3 V). On the other hand, I do not know if a Digital Discovery does the trick, since: (Source: https://reference.digilentinc.com/reference/software/waveforms/waveforms-sdk/reference-manual#digital_protocols) This means that I cannot communicate through 1.8 V SPI and read digital inputs/write digital outputs; am I right?
  22. Hello Everyone, I am trying to debug a high speed embedded application with DIO operations and I need to continuously monitor and log the logic levels of DIO. Is there a way to acquire continuous logic signals for the high speed DIO using WaveForms with Digital Discovery? I would appreciate a quick response on this. Thanks Nikhil Chaudhari
  23. As a newcomer to the very clever but quite sophisticated Raspberry Pi computers, can anyone provide a worked example of what files (and how) to load into the new Pi 4/8GB please? The wiki page images are a bit blurred and I'm not sufficiently up to speed to work out from first principles how to install the Adept2 and Waveforms packages. (45+ years of working in microprocessor code and hardware development have left me with a real appreciation of RTMF, but my age suggests I could do with a little help, please!)
  24. Hi all, I am seeing an issue on multiple Digital Discovery devices, where the timing precision is off by over a percent (where I'd expect 10—100ppm, at least 2 orders of magnitude better). The problem can be seen most easily by having the device generate a simple 50% duty cycle clock on one of its output pins, e.g. 1 kHz. On two different Digital Discovery devices I tested, the scope reports a frequency of below 990 Hz. The signals otherwise look as expected (good level, stable, good edges) apart from the bad frequency behavior. I confirmed the measurement with a high-quality Keysight 53230A frequency counter. Also, repeating the same measurement using an Analog Discover 2 shows the expected performance (1 kHz accurate to about 10 ppm, which is pretty good for a non oven-controlled crystal oscillator). I have attached screenshots of what I'm seeing for one of the Digital Discovery devices below. The other one is similar (showing about 987 Hz instead of 984.5 Hz). You can already see on the scope that the signal isn't a nice 1 kHz, and the Keysight measurement confirms that quite unambiguously. It should also be noted that the Keysight measurement shows that the signal not only has an unexpected frequency, but also that it isn't as stable as one would expect. I can provide serial numbers of the devices I tested and perform measurements if this helps to pinpoint what's going on here. Any help would be appreciated. Given my very positive experiences with the AD2, I can't believe that what I'm seeing is within spec. On the other hand, I verified this with two different DD devices purchased over 6 months apart, so it looks like I'm not just looking at a single faulty device. As a side node, it seems I'm seeing the same thing on the inputs; if I sample a high-quality externally generated 1 kHz clock (coming from an SRS FS740), the timing seems noticeably off. However, Waveforms doesn't provide an easy way to display the trigger rate counts as far as I am aware, so I want to focus on the clock generation problem first, because that's much easier to verify and reproduce. If anyone else can repeat this simple measurement and share their findings that would be great! Best regards, Sidney
  25. Hello, I am working on a project where I want to mount the digital discovery (410-338) by removing the bottom 4 screws that connect to the case. I'll then run the screws through some holes on the outside of an enclosure to connect to the digital discovery. The following information would be helpful: -What is the screw type and length for the 4 screws? -Is there a recommended torque value? In addition, is there any available reliability and failure rate data?