Jump to content
  • 0

Synchronous analog outputs coded in Python show DELAY


Alessandro

Question

Good morning,
I'm new in this forum. I'm writing because I'm working on a project related to the generation of two encoded signals. As you can see from the uploaded code, the encoded signal (encoded[]) is made of a fixed base (encoding[]) that is multiplied by each element in the array data[].
Therefore the encoded signal is a bit stream of 0 and 1 that I created using funcCustom.


The main constraint of this projects is that the two signals must be SYNCHRONOUS.

The PROBLEM is that in reality they're not as you can see from the oscilloscope image. Sometimes it happens that there is a small delay of 4µs and sometimes there isn't at all. Why does it happen? This is crucial for my application. 
In the code I used this kind of synchronization:

dwf.FDwfAnalogOutMasterSet(hdwf, c_int(1), c_int(0))
dwf.FDwfAnalogOutConfigure(hdwf, c_int(-1), c_bool(True))

Thank you,
Alessandro

digilent_delay.jpg

CDMA_customFunc.py

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Hi @Alessandro

For such digital signals it would be better to use the digital-out function.

I've made some changes to your script to generate without jitter: CDMA_customFunc.py

With analog-out use the funcCustomPattern option to have fixed sample rate. With funcCustom it aims for the specified frequency using fraction sample step which results varying sample lengths.
With AD2 the given pattern is fit to the buffer size, so power of two number of samples should be provided to have equal sample rate.
The latest software fixes a possible 20ns phase problem:

https://forum.digilentinc.com/topic/8908-waveforms-beta-download/

 

image.png.6e10e9f136d17e78f8f3940ba13e45d1.png

image.png.ad45aecbbe6229fbb9d05568da2ceb5e.png

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...