UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Explorer
Explorer
389 Views
Registered: ‎10-16-2018

Visualizing 5 kHz sine wave by Pmod DA3

Jump to solution

Hi ,

I am using DDS IP core to visualize a 5 kHz sine wave signal. 

At first I simulated the IP core using Vivado simulator . I used 25 MHz clock signal. I got a sine wave signal as shown in the first attached picture. 

When I changed the Radix from "signed data type" to "unsigned data type" the sine wave will be like in the second attached picture.

And when I implemented my design on my ARTY 7 , and connected the output of Pmod DA3 to the oscilloscope , I got a signal similar to that in the second attached picture ! As shown in the third attached picture . 

I changed all the intended data types in my program from u16 to s16 but the no thing is changed ! 

Pls , I am looking forward your help. How to visualize a DDS sine wave properly using Pmod DA3 ?

Thanks.

s1.JPG
s2.JPG
photo_2019-04-18_00-59-57.jpg
0 Kudos
1 Solution

Accepted Solutions
359 Views
Registered: ‎06-21-2017

Re: Visualizing 5 kHz sine wave by Pmod DA3

Jump to solution

You have at least two problems.  First, your DAC seems to be clocked at a much lower rate than 25MHz.  How fast is the clock going to the DAC?

Second, it looks like your DAC expects unipolar data (unsigned) and the DDS is producing signed (two's compliment) data.  You must convert to unipolar data.  You can't just call it unsigned, you need to perform a mathmatical operation.  You have sixteen bit data. Try adding 0x8000 to each sample before sending it to the DAC.

View solution in original post

2 Replies
360 Views
Registered: ‎06-21-2017

Re: Visualizing 5 kHz sine wave by Pmod DA3

Jump to solution

You have at least two problems.  First, your DAC seems to be clocked at a much lower rate than 25MHz.  How fast is the clock going to the DAC?

Second, it looks like your DAC expects unipolar data (unsigned) and the DDS is producing signed (two's compliment) data.  You must convert to unipolar data.  You can't just call it unsigned, you need to perform a mathmatical operation.  You have sixteen bit data. Try adding 0x8000 to each sample before sending it to the DAC.

View solution in original post

Explorer
Explorer
317 Views
Registered: ‎10-16-2018

Re: Visualizing 5 kHz sine wave by Pmod DA3

Jump to solution
Hi @bruce_karraffa In fact the clock going to DAC is 25 MHz / 16 , since the Frequency Ratio is set to 16. I used your idea and added 0x80 to each written Byte and I got the sinewave correct . And I reduced the frequency ratio to /2 . Thank you @bruce for perfect analyzing and solution to my issue . Regards.
5kHz_smoother.jpg
0 Kudos