Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
17 years ago

Interfacing MegaWizard NCO with DA converter

Dear all

I'm trying to connect MegaWizard NCO output to Digital-to-Analog converter. Since NCO output is two's complement and DAC does not accept two's complement, I need to convert two's complement to standard number system. Is there a simple way of converting in VHDL? Which library do I have to use?

Thank you and I'm look forward to hearing from you.

2 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi,

    What is your DAC's number system. If it is not 2's complement then it is likely to be offset binary and then conversion is easy, just invert the sign bit.

    Kaz
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Kaz,

    I changed my code and now I can see correct and clean spectrum. Thank you very much!

    ziwukim