• Channels
Part Inventory
Go
 
powered by:

 
  • Quick Poll
What Social Networking site do you use the most?



VOTE VIEW RESULTS
Previous Polls

Premium Content

New Signal Chain Technical Papers from Texas Instruments:

 

 

 

C Program Generates Gated Sine Waves Digitally


Contributing Author

June 22, 1998

Print
Reprints Comment Subscribe

The C program presented will generate gated-digital sine waves at a 10-Hz frequency (see the listing). Three parameters are user-defined at the head of the program—the output frequency (FO), the sampling rate (FS), and the number of samples to be saved to disk file “xxx”.

The sine function is synthesized by an undamped-biquad IIR digital filter. The sine waves are initiated by an impulse signal of a sampling period width (1/FS), whose impulse amplitude equals the sine-wave amplitude response of the filter (see the figure).

The sineOn( ) and sineOff( ) macros control the initiation of the gated sine waves. These are implemented as inline code in the for( ) loop in the program. A multitude of non-overlapping gated sine waves can be generated. Two such sine waves are shown in the figure. A multiple of sine frequencies (FO) can be generated with a suitable data structure.

Average (0 Ratings):

Subscribe
Subscribe to Electronic Design and start receiving more articles like this one
Filed Under:

Check for price and availability on Source ESB:

Go
powered by  
    There are no comments to display. Be the first one!
You must log on before posting a comment.

Are you a new visitor? Register Here
Acceptable Use Policy

Sponsored Links