FPGA Intellectual Property
PCI Express*, Networking and Connectivity, Memory Interfaces, DSP IP, and Video IP
6355 Discussions

Generate sine wave and triangular with Megafunction

Altera_Forum
Honored Contributor II
1,344 Views

Hi everybody!  

 

I wonder if you can make a sine and triangle wave generator using mega unctions, if so hopefully I can guide on how to do it please.  

 

Greetings 

 

Edgardo
0 Kudos
9 Replies
Altera_Forum
Honored Contributor II
409 Views

the NCO core will generate sine waves. triangle waves are probably best done in code, its not much more than an accumulator.

0 Kudos
Altera_Forum
Honored Contributor II
409 Views

Why only megafunctions?  

 

What is the sine wave/triangle wave used for? Will you use a DA converter for making the analog signal? What is the maximum frequency?  

 

Stefaan
0 Kudos
Altera_Forum
Honored Contributor II
409 Views

I need to generate a sine wave of 50 Hz and a two triangular carriers of about 1.5 kHz to drive inverters. These waves must be compared and will drive the IGBT with the inverter, this is essentially what I need to do.  

 

Greetings from Chile 

 

PS: sorry for writing, but I'm using a translator to write the text.
0 Kudos
Altera_Forum
Honored Contributor II
409 Views

Here is a more complete example of the NCO code, I mentioned in your previous thread. I have used e. g. for 16,7/50 Hz inverter.

0 Kudos
Altera_Forum
Honored Contributor II
409 Views

Thank you FvM 

 

I will review now and tell you how I was  

 

Greetings
0 Kudos
Altera_Forum
Honored Contributor II
409 Views

 

--- Quote Start ---  

I need to generate a sine wave of 50 Hz and a two triangular carriers of about 1.5 kHz to drive inverters. These waves must be compared and will drive the IGBT with the inverter, this is essentially what I need to do.  

--- Quote End ---  

 

 

If you take it a step further, and do the comparison in the logic chip, you need only to output some digital signals that can be used as input for your IGBT-gate-driver chips. If you have the logic available, it can save you some analog chips and hassle. 

 

STefaan
0 Kudos
Altera_Forum
Honored Contributor II
409 Views

as in megafunction make sure my sine wave is 50 Hz and algorithm I should use in this case 

 

Large ROM 

Small ROM 

CORDIC 

Multiplier Based 

 

I need your help friends, I need guidance. 

 

Greetings 

0 Kudos
Altera_Forum
Honored Contributor II
409 Views

the different NCO methods have different trade offs as far as resources used (RAM, logic, multipliers). they are explained on page 34 of the NCO User Guide. or you could look at the resource estimation tab in the MegaWizard. 

 

http://www.altera.com/literature/ug/ug_nco.pdf 

 

in your case i would choose multiplier-based if you have some available.
0 Kudos
Altera_Forum
Honored Contributor II
409 Views

I need to generate a sine wave of 50 Hz and a triangular carrier (2 kHz) to drive inverters using Quartus II and Cyclone II device. These waves must be compared and will drive the IGBT with the inverter , this is essentially what I need to do.

0 Kudos
Reply