Jump to content
Fourth of July -- Digilent US offices closed ×

attila

Technical Forum Moderator
  • Posts

    6,662
  • Joined

  • Last visited

Posts posted by attila

  1. Hi @eradarhughes

    Right, you are calling Analog and DigitalInStatus, not Analog twice.

    The bottleneck is mostly with the latency and not with the bandwidth.
    In my earlier test I got 1.25ms/analog-acquisition (800Hz) on average. Calling analog+digital would probably be around 2.5ms (400Hz)

    I've just tested ADP3450, the analog-acquisition over USB with 32ksamples is about 8ms, 64ksamples is about 14.5ms
    Over Gb Ethernet 4.4ms w 32kS and 8.3ms w 64kS.
    Currently the capture data for all channels are fetched (like 32k*4Ch), I will optimize this method in the near future.

    On the other hand ADP can record 128M samples at up to 125MHz on one channel.
    The device can also be used in embedded Linux mode with higher transfer rate and lower latency.

     

  2. Hi @Someone

    It is not recommended to apply voltage to any unsupplied device or IC since in this case the protection diodes will have to handle it.

    The Digital Discovery IOs (24-49) as input are 5V compatible with level translator. The output voltage is adjustable between 1.2V and 3.3V, this also adjusts the input threshold between ~0.5V and ~1.5V The inputs (0:23) are also 5V compatible.

    The Analog Discovery DIOs are also compatible with 5V but this through protection circuit, so it will sink more current than DD's translator solution. The output voltage is fixed 3.3V The input threshold is ~1.5V and ~0.5V with the 5th and 7th configurations.

    Both are protected up to +/-20V

    For more details see the reference pages and WaveForms app Help
    https://digilent.com/reference/test-and-measurement/digital-discovery/start
    https://digilent.com/reference/test-and-measurement/analog-discovery-2/start

  3. Hi @PeterCo

    For timeout trigger set max length to 0, like:

    dwf.FDwfDigitalInTriggerSourceSet(hdwf, c_ubyte(3)) # trigsrcDetectorDigitalIn
    # DIO 7 (DIO 31 for Digital Discovery) 
    dwf.FDwfDigitalInTriggerResetSet(hdwf, c_int(0), c_int(0), c_int(1<<7), c_int(0)) # reset on rise (low, high, rise, fall)
    dwf.FDwfDigitalInTriggerSet(hdwf, c_int(0), c_int(1<<7), c_int(0), c_int(0)) # count while high (low, high, rise, fall)
    dwf.FDwfDigitalInTriggerLengthSet(hdwf, c_double(200e-9), c_double(0.0), c_int(0)) # min, max = 0 > timeout
    dwf.FDwfDigitalInTriggerCountSet(hdwf, c_int(1), c_int(0)) # count 1, no restart

    image.png.912fefe198f9d24e3ab64355ac6c0ce3.png

    image.png.723cd3d35d3f7ecb5c9234c371a53cbb.png

  4. Hi @eradarhughes

    You should not call FDwfAnalogInStatus again when done. This would be required only if you called it previously with argument 0 (do not read data) but this double call would increase the latency.

    See the: AnalogIn_Trigger.py For maximum performance use:

    ...
        while True:
            dwf.FDwfAnalogInStatus(hdwf, c_int(1), byref(sts))
            if sts.value == DwfStateDone.value :
                break
        
        dwf.FDwfAnalogInStatusData(hdwf, 0, rgdSamples, ...

    I've just measure and on my laptop I get about 800 acquisitions / sec in average, 1.2ms/capture.
    The latency between captures depends on the congestion of USB, other running application and services may cause periodic lags.
    Connecting the AD2 directly to the computer (root hub) should give better result than with external hub, and there could be difference in computer ports too (which may use different controllers).

  5. Hi @reddish

    The digital IO signals are shared in the device between Digital-IO, Out and In functions. The Digital-IO has priority over Digital-Out. The Digital-Out is only applied for a signal when the Digital-IO Enable and Output are zero for the respective bit.

    The protocols use the Digital-In/Out device resources to create various communication protocols. Only one of the protocols can be used at a time. The Digital-Out is used to generate the output signals and the Digital-In to capture the received data. Overriding a signal used by the protocol with Digital-IO may mess up the communication.
    Note:
    The I2C with clock stretching uses additional signals.
    The DIO channe indexing for Digital Discovery starts from 0, 0 is DIO-24, 1 is DIO-25…

  6. Hi @PeterCo

    I hope this works:

    dwf.FDwfDigitalInTriggerSourceSet(hdwf, c_ubyte(3)) # trigsrcDetectorDigitalIn
    # DIO 7 (DIO 31 for Digital Discovery) positve pulse 100ns-1us
    dwf.FDwfDigitalInTriggerResetSet(hdwf, c_int(0), c_int(0), c_int(1<<7), c_int(0)) # reset on rise (low, high, rise, fall)
    dwf.FDwfDigitalInTriggerSet(hdwf, c_int(0), c_int(1<<7), c_int(0), c_int(0)) # count while high (low, high, rise, fall)
    dwf.FDwfDigitalInTriggerLengthSet(hdwf, c_double(100e-6), c_double(1000e-6), c_int(0)) # min, max
    dwf.FDwfDigitalInTriggerCountSet(hdwf, c_int(1), c_int(0)) # count 1, no restart

    See the WF SDK/ samples/ py/ DigitalIn_PulseTrigger.py 

×
×
  • Create New...