📄 sin_table_tools.c
字号:
#include <stdio.h>
#include "math.h"
main()
{
int i;float s;
printf("--Copyright (C) 2007-2008 Unic Team\n");
printf("--This module is the a lookup table for\n");
printf("--sin wave. The input to the block is\n");
printf("--the phase angle value and the output\n");
printf("--is the 10 bit sin value.\n");
printf("--Version:V1.0\n");
printf("--Author:YUE KUN\n");
printf("--Email:heroxue@126.com\n");
printf("-----------------------------------------\n\n");
printf("width=10;\ndepth=1024;\naddress_radix=dec;\ndata_radix=dec;\ncontent begin\n");
for(i=0;i<1024;i++)
{
s = sin(atan(1)*8*i/1024);
printf("%d : %d;\n",i,(int)((s+1)*1023/2));
}
printf("end;");
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -