Nico G

Members
  • Content Count

    15
  • Joined

  • Last visited

About Nico G

  • Rank
    Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Thank you @attila! Which version is this WaveForms beta that has this 3rd bit SPI mode flag? Where can I download it? EDIT: I found the link here: However, I think the link to WaveForms beta v3.16.10 is incorrect. It is http://s3//digilent/Software/Waveforms3Beta/3.16.10/digilent.waveforms_beta_v3.16.10_64bit.exe?_ga=2.222329307.1959141895.1613733661-1375308676.1613733661 but it should be https://digilent.s3-us-west-2.amazonaws.com/Software/Waveforms3Beta/3.16.10/digilent.waveforms_beta_v3.16.10_64bit.exe?_ga=2.222329307.1959141895.1613733661-1375308676.161373366
  2. @attila Thank you for your reply. Is there a way or configuration to both transmit and receive correctly in this scenario (avoiding the received data by the master to be corrupt)? Is there a way to configure SPI mode 1 to generate the MOSI; but SPI mode 0 to read the MISO? Is there a way to solve this? Thank you!
  3. Are there any differences between Python and C++ version of WaveForms SDK API functions with respect to execution time of the functions?
  4. 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:
  5. @attila Are you sure the proper configuration is SPI mode 1? As the MISO signal changes its value each falling edge of SCLK, I think the SPI phase should be set to 0; so the proper configuration should be SPI mode 0.
  6. 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 w
  7. Thank you @attila. I have 2 more questions though. 😅 1) How can I configure the pin that will act as a trigger? Where in the code (if I use FDwfAnalogInTriggerSourceSet or FDwfDigitalInTriggerSourceSet) do you configure which pin is the source of the trigger? I see the trigsrc constant values in the file dwfconstants.py: # trigger source trigsrcNone = c_ubyte(0) trigsrcPC = c_ubyte(1) trigsrcDetectorAnalogIn = c_ubyte(2) trigsrcDetectorDigitalIn = c_ubyte(3) trigsrcAnalogIn = c_ubyte(4) trigsrcDigitalIn = c
  8. Thank you @attila The AnalogIn functions (FDwfAnalogInFrequencySet, FDwfAnalogInTriggerSourceSet, FDwfAnalogInConfigure, FDwfAnalogInStatus) are available in the Analog Discovery 2, but not in the Digital Discovery. Am I right?
  9. 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
  10. Thank you for the quick reply @attila. Was the FDwfDigitalSpiWriteOne or FDwfDigitalSpiReadOne function that I should replace with FDwfDigitalSpiWriteRead16? Or both? I ask this because the function that did not work for me was FDwfDigitalSpiReadOne (always returns 0), and you said
  11. Thank you for the quick reply @attila. So with a Digital Discovery, I can communicate through 1.8 V SPI (with function FDwfDigitalSpiWriteRead16) generate a digital 1.8 V output (with function FDwfDigitalIOOutputSet) read 2 digital 1.8 V inputs (with functions FDwfDigitalIOStatus + FDwfDigitalIOInputStatus) All these 3 simulaneously?
  12. 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/wave
  13. 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.LoadLibr