我有一个正弦表
unsigned int sin[120]={0x800,0x86b,0x8d5,0x940,0x9a9,0xa11,0xa78,0xadd,0xb40,
0xba1,0xbff,0xc5a,0xcb3,0xd08,0xd59,0xda7,0xdf1,0xe37,0xe78,0xeb5,0xeed,0xf20,
0xf4e,0xf77,0xf9b,0xfb9,0xfd2,0xfe6,0xff4,0xffd,0xfff,0xffd,0xff4,0xfe7,0xfd3,
0xfba,0xf9c,0xf78,0xf4f,0xf21,0xeee,0xeb6,0xe7a,0xe39,0xdf3,0xda9,0xd5c,0xd0a,
0xcb5,0xc5d,0xc02,0xba4,0xb43,0xae0,0xa7b,0xa14,0x9ac,0x943,0x8d9,0x86e,0x803,
0x798,0x72d,0x6c3,0x659,0x5f1,0x58a,0x525,0x4c2,0x461,0x403,0x3a7,0x34f,0x2fa,
0x2a8,0x25a,0x210,0x1cb,0x189,0x14c,0x114,0xe1,0xb2,0x89,0x65,0x46,0x2d,0x19,
0xb,0x3,0x0,0x2,0xa,0x18,0x2b,0x44,0x62,0x86,0xae,0xdc,0x10f,0x147,0x183,0x1c4,
0x20a,0x253,0x2a1,0x2f2,0x347,0x39f,0x3fa,0x458,0x4b9,0x51c,0x581,0x5e7,0x650,
0x6b9,0x723,0x78e};
使用定时器控制DA输出它们就好。
|