• Content Count

  • Joined

  • Last visited

  1. Thank you for the help, @attila. After some more checks, I recognized that the tested hardware was causing the issue and not the analog discovery. Sorry for that.
  2. Hi @attila I made a mistake in my question. I wrote But actually I meant The pulses are reliably measured. But the number of high samples is always smaller than expected. Most of the time, I expect the measured pulse to be three samples longer than it is. What means the error equals about 30 microseconds.
  3. Hello Community I am using the Analog discovery 2 controlled by a C# Software. At a certain point of the software, I need to check the length of a detected pulse. Before this, I prepare the digital in component of the device. private const uint BUFFER_SIZE = 4000; private const uint DIGITAL_IN_DIVIDER = 1000; private const uint CLOCK_FREQUENCY = 100000000; public void prepareForPulseDetection( int digitalIoIndex ) { checkDigitalIoIndex( digitalIoIndex ); // sampling frequency = 100 MHz / 1000 = 100 kHz (-> 10 us) dwf.FDwfDigitalInDividerSet( device, DIGITAL_IN_DIVIDER ); // j
  4. Hello I found a 3D model of the analog discovery 2 that includes the PCB at the following link: https://reference.digilentinc.com/reference/instrumentation/analog-discovery-2/start?redirect=1 Is there a 3D-Model that includes the case as well? kind regards
  5. Hi again @attila Now I moved on to C# and I am facing the same problem again. The function dwf.FDwfDigitalInStatusData( int, byte[], int ); wants an array of bytes to store the sampled data. How is it possible to set the data format on 16 since the type byte represents an unsigned 8 bit integer?
  6. Fine, now everything is clear. Thank you very much!
  7. Hi @attila I corrected my code as you suggested and it works fine, thank you once again! But I have got another question about the data format: If I set the data format to 8, no samples would be taken from digital pins 8 to 15? What is stored in the bits on position 16 to 31 with dataformat 32 since I only have 16 DIO lines?
  8. Hello @attila and @JColvin Thank you for both of your answers. I will try out the new code example. I think, I will be able to make it work.
  9. Hello Digilent world First, before I write my questions, I would like to provide some information: - Used device: Analog Discovery 2 (revision 3) - Programming language is C++ - IDE: Visual Studio Community 2013, version 12 - Operating System: Windows 10 I am trying to control the device with the SDK but I got issues with the Digital-In-Instrument. I attached a .cpp file with my code. My aim is to configure digital pin 0 to take 1000 samples as soon as a rising edge on the same pin occurs. To generate a rising edge on this pin, I connect digital pin 0 and digital