Effedipi Posted November 20, 2023 Share Posted November 20, 2023 Hello! is it possible to use one Digital Discovery to generate a pattern on some IO's and analyze the response on others? ALso, is it possible to use it as I2C master at custom speed up to the maximum allowable? Thanks Francesco Link to comment Share on other sites More sharing options...
0 attila Posted November 20, 2023 Share Posted November 20, 2023 Hi @Effedipi Yes, the Patter Generator and Logic Analyzer can work in parallel in the device, using common and/or DIO DIN lines. The Protocol uses the Pattern Generator for transmission/write (driving the DIO lines) and the Logic Analyzer device resources for reception. With the "Logic Analyzer" option the reception is disable, the Logic Analyzer can be used to interpret the transfer/reception and to verify signal timings. Link to comment Share on other sites More sharing options...
0 Effedipi Posted November 20, 2023 Author Share Posted November 20, 2023 (edited) HI @attila and thanks for your reply. What about running I2C at the maximum allowed bitrate? is it possible? In other words (I am using Lavbiew) can I write an arbitrary value as input of FDwfDigitalI2cRateSet? Regards Francesco Edited November 20, 2023 by Effedipi Link to comment Share on other sites More sharing options...
0 attila Posted November 20, 2023 Share Posted November 20, 2023 Hi @Effedipi The I2C master (with clock stretching) and slave mode can work up to 2.5MHz but this requires stronger pullups. Without clock stretching option it can theoretically work up to 25MHz but this may not respect the timings. This mode simply generates the pattern without waiting on SCL to go high or handshake. Link to comment Share on other sites More sharing options...
0 Effedipi Posted November 20, 2023 Author Share Posted November 20, 2023 I can use external pullups, no problem for that. It is not clear to me how to configure the Digital Discovery to make what NI-HSDIO call "Dynamic Generation and Acquisition", where it is possible to play a user defined waveform on a output and at the same time record an input. Is there any document that describe how to do this? Thanks Francesco Link to comment Share on other sites More sharing options...
0 attila Posted November 21, 2023 Share Posted November 21, 2023 Hi @Effedipi For up to digital-out device buffer size samples (32768 for DD) the simpler method can be used like in DigitalIn_Acquisition.py DigitalOut_Custom.py ... examples For more samples with Digital Discovery see WF SDK/ samples/ py/ DigitalDiscovery_PlayRecord.py ... Link to comment Share on other sites More sharing options...
0 Effedipi Posted November 21, 2023 Author Share Posted November 21, 2023 Thanks a lot I will study the example. Is there an example where an external file with the file to be play'ed is used and the recording is saved to another file? Francesco Link to comment Share on other sites More sharing options...
0 attila Posted November 22, 2023 Share Posted November 22, 2023 Hi @Effedipi Play&Record from file is the AnalogOutIn_PlayRecordStereo.py Link to comment Share on other sites More sharing options...
0 Effedipi Posted November 22, 2023 Author Share Posted November 22, 2023 hi @attila Thanks.. can you provide an example file to use as template for inputs? Link to comment Share on other sites More sharing options...
0 Effedipi Posted November 22, 2023 Author Share Posted November 22, 2023 @attila, today I received the digital discovery. When I try to run "digital_I2c.py" I get the following error: Opening first device failed to open device b'Device not supported. No compatible configuration found. Update Digilent WaveForms.\nFDwfDeviceOpenEx\n' Why? It works fine with Waveforms Thanks Francesco Link to comment Share on other sites More sharing options...
0 attila Posted November 22, 2023 Share Posted November 22, 2023 Hi @Effedipi Change the lines 24+ to: print("Opening first device") dwf.FDwfDeviceOpen(c_int(-1), byref(hdwf)) # device configuration of index 3 (4th) for Analog Discovery has 16kS digital-in/out buffer #dwf.FDwfDeviceConfigOpen(c_int(-1), c_int(3), byref(hdwf)) Link to comment Share on other sites More sharing options...
0 Effedipi Posted November 23, 2023 Author Share Posted November 23, 2023 (edited) @attila it works, thanks fro the excellent support!!! Edited November 23, 2023 by Effedipi Link to comment Share on other sites More sharing options...
0 attila Posted November 23, 2023 Share Posted November 23, 2023 Hi @Effedipi The pulls by default are not enabled and are not activated in the example script either. Link to comment Share on other sites More sharing options...
Question
Effedipi
Hello!
is it possible to use one Digital Discovery to generate a pattern on some IO's and analyze the response on others?
ALso, is it possible to use it as I2C master at custom speed up to the maximum allowable?
Thanks
Francesco
Link to comment
Share on other sites
12 answers to this question
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now