Generate of Sine Waveform

There is a website which gives and generates Sine wave look-up table as per requirement.

link to website: Sine Look-up table Generator

Generation of sinusoidal waveform

C program:

#include <reg51.h>
int mynum[]={128,143,159,174,189,202,215,226,235,243,249,253,255,255,253,249,243,235,226, 215,202,189,174,159,143,128,112,96,81,66,53,40,29,20,12,6,2,0,0,2,6,12,20,29,40,53,66,81,96,112};
void main()
{
 while (1)
 {
 int z;
 for (z=0;z<50;z++)
 {
 P1=mynum[z];
 }
 }
}

 

Advertisements