Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
987 Views

Generate sine wave and triangular with Megafunction

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 I
52 Views

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

Altera_Forum
Honored Contributor I
52 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
Altera_Forum
Honored Contributor I
52 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.
Altera_Forum
Honored Contributor I
52 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.

Altera_Forum
Honored Contributor I
52 Views

Thank you FvM 

 

I will review now and tell you how I was  

 

Greetings
Altera_Forum
Honored Contributor I
52 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
Altera_Forum
Honored Contributor I
52 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 

Altera_Forum
Honored Contributor I
52 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.
Altera_Forum
Honored Contributor I
52 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.

Reply