Jump to content
  • 0

Digital Discovery Play Mode not outputting


AlanB

Question

I've recently come back to my Digital Discovery after a few months away.  I installed the latest version of WaveForms (3.18.49) and got started...

I tried running my Python script (which I'm sure *used* to work) to load a signal and play it back with Play mode.  While it appeared to run without error, I was getting inconsistent output on the pins - usually nothing at all, but I think I once had a garbled version of the output I was expecting.

I've gone to try running the example applications to try to understand the problem, and I'm not getting what I expect there either.  Running the file "DigitalDiscovery_Play.py" from the SDK examples doesn't appear to give any output at all on the pins (I have a logic analyser connected to most of the pins labelled 24-31).  It does print out the following:

DWF Version: b'3.18.49'
Opening first device
Configuring Digital Out...
Samples:134217728 Rate:100000000.0Hz  Period:1.34217728s

Should I expect more than this?  Is installing older versions of the SDK likely to be the best route forwards?

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

Hi @AlanB

Here you can find the new version in which there is no need for DataSet after Configure:

Try with param stop. With run option, if the previously used application exited with shutdown the IO voltage level translators remain disabled.
dwf.FDwfParamSet(DwfParamOnClose, c_int(1)) # 0 = run, 1 = stop, 2 = shutdown
If the run option is needed, after open use the following to set the IO voltage and enable the translators:
# set digital voltage between 1.2 and 3.3V
dwf.FDwfAnalogIOChannelNodeSet(hdwf, c_int(0), c_int(0), c_double(3.3))

dwf.FDwfAnalogIOConfigure(hdwf, c_int(0)) 

The Digital Discovery play output captured with Analog Discovery:

image.png

Link to comment
Share on other sites

  • 0
On 8/29/2022 at 9:45 AM, attila said:

Until this bug is solved use the following workaround, call DataSet twice, before and after Configure.
FDwfDigitalOutPlayDataSet
FDwfDigitalOutConfigure
FDwfDigitalOutPlayDataSet

I have copied line 64 of DigitalDiscovery_Play.py and placed it after the Configure call, as follows:

# set play data array of 16 bit samples
dwf.FDwfDigitalOutPlayDataSet(hdwf, byref(rgwPlay), c_int(16), c_int(int(nPlay)))

print("Starting Digital Out...")
dwf.FDwfDigitalOutConfigure(hdwf, c_int(1))
dwf.FDwfDigitalOutPlayDataSet(hdwf, byref(rgwPlay), c_int(16), c_int(int(nPlay)))

But I'm still not seeing any output on the output pins.  Do I need to use different parameters for the two calls to DataSet?

Link to comment
Share on other sites

  • 0

I can see the same graph when I run your script.  I don't see any output on a logic analyzer on the IO lines.  Can you confirm which lines (as labelled on the unit) should be being driven using that script?

Link to comment
Share on other sites

  • 0

Thanks for the suggestions.  With the updated version of the SDK (3.18.50) and the change to param stop-on-close, I can see the expected output from the DigitalDiscovery_PlayRecord.py example as you've shown.  I haven't had the same success with DigitalDiscovery_Play.py (yet).  However, my original Python scripts appear to have started working again, outputting the expected patterns, so the latest SDK version is the one I'll carry on with.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...