Forum Discussion

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

sine wave generator

Hi to all,

i want to generate high precision,low frequencies sinusoidal signals (50,80 and 180 hz) trough my altera cyclone4 (vhdl code) with the PWM technique.

I've started to do some tests, in particular i've used the NCO megafunction, but the problem is that the only way to generate high precision 50hz signal is to set input clock frequency as a power of 2 (for example 65.536Khz).

Is there any way to overcome this issue?

Is there another more interesting techniques to generate sinusoidal samples for high precision signals?

Let me know, thanks...

3 Replies

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

    --- Quote Start ---

    Hi to all,

    i want to generate high precision,low frequencies sinusoidal signals (50,80 and 180 hz) trough my altera cyclone4 (vhdl code) with the PWM technique.

    I've started to do some tests, in particular i've used the NCO megafunction, but the problem is that the only way to generate high precision 50hz signal is to set input clock frequency as a power of 2 (for example 65.536Khz).

    Is there any way to overcome this issue?

    Is there another more interesting techniques to generate sinusoidal samples for high precision signals?

    Let me know, thanks...

    --- Quote End ---

    you can use power of 2 nco for accurate sinusoid of any value. The resolution of phase accumulator can be increased. The frequency will be correct but phase drift may occur.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    but the problem is that the only way to generate high precision 50hz signal is to set input clock frequency as a power of 2 (for example 65.536Khz).

    --- Quote End ---

    That's not the concept of NCO. You can generate arbitary frequencies with effectively unlimited accuracy and signal quality.