- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi All,
I am trying to generate a simple Sine wave from DAC5672 on my Hsmc daughter card from Terasic . The NCO i am using is from Open Cores , i works fine in simulation as shown in screen shot attached , But when i connect my scope probes i get distorted output screen shot attached . The DAC and NCO are provided with 100Mhz clock and the required output is 12Mhz , which is in my case is 12Mhz but distorted . When is connect a simple upcounter , i get a Saw tooth wave output as expected . Has anyone solved this problem ? is there something i am missing ?Link Copied
9 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Seems like you're providing wrong input to the DAC. Check if it expects you to give it complement 1s input?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The 14-bit digital data input fallows the offset positive binary coding scheme.
Your turn to google now.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Really great idea.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the guidance, now i need a VHDL function to convert 14-bit std_logic into off-set binary code, any ideas ?
:)- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Strange question from FPGA guru :) Seems like You only need to change MSB according to the value... Google for TI DAC interfaces pdf, there's a good explanation and examples.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here's how i am changing values in VHDL
ADJUSTING_OFFSET: PROCESS(sys_clk, sin_out_reg) BEGIN IF reset_n = '0' THEN sin_out_adj <= (others=>'0'); ELSIF rising_edge(sys_clk) THEN IF nco_sin_out(13) = '1' THEN sin_out_adj <= NOT(nco_sin_out)+"00000000000001"; ELSE sin_out_adj<= '1'& nco_sin_out(12 downto 0); END IF; END IF; -- END IF; END PROCESS; But i am not getting a clean sine wave out ?? the frequency of generated signal is correct see image attached- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- Here's how i am changing values in VHDL ADJUSTING_OFFSET: PROCESS(sys_clk, sin_out_reg) BEGIN IF reset_n = '0' THEN sin_out_adj <= (others=>'0'); ELSIF rising_edge(sys_clk) THEN IF nco_sin_out(13) = '1' THEN sin_out_adj <= NOT(nco_sin_out)+"00000000000001"; ELSE sin_out_adj<= '1'& nco_sin_out(12 downto 0); END IF; END IF; -- END IF; END PROCESS; But i am not getting a clean sine wave out ?? the frequency of generated signal is correct see image attached --- Quote End --- To change 2's complement to offset binary just invert the sign bit. sign_inv = not data(13); data <= sign_inv & data(12 downto 0); keep this combinatorial to avoid latency problems
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- Hi All, I am trying to generate a simple Sine wave from DAC5672 on my Hsmc daughter card from Terasic . The NCO i am using is from Open Cores , i works fine in simulation as shown in screen shot attached , But when i connect my scope probes i get distorted output screen shot attached . The DAC and NCO are provided with 100Mhz clock and the required output is 12Mhz , which is in my case is 12Mhz but distorted . When is connect a simple upcounter , i get a Saw tooth wave output as expected . Has anyone solved this problem ? is there something i am missing ? --- Quote End --- I can not send a private message to ask you a question. I'm in exactly the same situation how you have resolved the problem? my email yonatanhanann@gmail.com

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page