通过输入振幅,直流偏移,采样点数三个参数可以生成正弦值的数据表格,可分别进行浮点计算和整数计算,便于单片机编程例如输入2048,2048,50三个参数,生成的表格为unsignedintsin[50]={2048,2304,2557,2801,3034,3251,3449,3626,3777,3901,3995,4059,4091,4091,4059,3995,3901,3777,3626,3449,3251,3034,2801,2557,2304,2047,1791,1538,1294,1061,844,646,469,318,194,100,36,4,4,36,100,194,318,469,646,844,1061,1294,1538