Jump to content
  • 0

Visualizing 5 kHz sine wave by Pmod DA3


Ahmed Alfadhel

Question

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

Edited by Ahmed Alfadhel
Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 1

@Ahmed Alfadhel

To understand what's going on, check out table 8 of the datasheet on page 15.  Basically, the DAC provides outputs between 0 and max, where 0 is mapped to zero and all ones is mapped to the max.  In other words, you should be plotting your data as unsigned.

To convert from your current twos complement representation to an unsigned representation where zero or idle is in the middle of the range, rather than on the far end, just toggle the MSB.

Dan

Link to comment
Share on other sites

  • 0

Hi @D@n

Thank you for your perfect analyzing and solution to my issue .

I just toggled the MSB in each written Byte and I got the sinewave finally.

However, I wondered , since in the data sheets (AD5541A , AD7303) is mentioned I have to use operation amplifier in order to get a bipolar signal ! 

Thanks again. 

  

 

 

 

 

5kHz.jpg

5kHz_smoother.jpg

DA1_Bipolar.JPG

DA3_bipolar.JPG

Edited by Ahmed Alfadhel
Link to comment
Share on other sites

  • 0

@Ahmed Alfadhel,

One other thing to note is your scope was AC coupled in your pictures so you were "seeing" a bipolar waveform of -1.28v to +1.28v.

If you had DC coupled, the waveform on the scope would have shifted up and you would have observed the 0v to 2.5v the DA was outputting.

To get an actual bipolar output, you need the opamp level shifter/scaler.

Link to comment
Share on other sites

  • 0
On 4/18/2019 at 12:14 AM, Ahmed Alfadhel said:

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

Hi, I'm new to FPGA programming and I need to send out a sine signal using the Xlinix DDS IP core to the Pmod DA3, similarly to how you have done it above. Could you please provide the code to operate the DDS core and Pmod or provide some guidance on how I can achieve my goal. Any help will be much appreciated.

Link to comment
Share on other sites

  • 0
On 5/25/2021 at 8:45 PM, user3416 said:

Could you please provide the code to operate the DDS core and Pmod or provide some guidance on how I can achieve my goal.

@user3416 Hi,

You need to create your block diagram (DDS IP, PmodDA3 IP, GPIO IP, Microblaze,....) , then you have to embed C code using XSDK (the C code for instructing the IPs how to interact with each other).

Yon can benefit from my project resources here:

https://www.hackster.io/ahmed-alfadhel/frequency-hopping-spread-spectrum-fhss-system-c72dde 

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