單片機應用系統設計技術——10BitDA正弦信號發生器

#include <reg52.h>

//接口定義
sbit DA = P1^1;
sbit CK = P1^2;
sbit CS = P1^4;

//10bit取樣,1024點正弦查表數據
unsigned int code sine_dot[1024]=
{
0x200,0x203,0x206,0x209,0x20c,0x20f,0x212,0x215,0x219,0x21c,0x21f,0x222,0x225,0x228,0x22b,0x22f,0x232,
0x235,0x238,0x23b,0x23e,0x241,0x244,0x247,0x24b,0x24e,0x251,0x254,0x257,0x25a,0x25d,0x260,0x263,0x266,0x269,0x26d,0x270,
0x273,0x276,0x279,0x27c,0x27f,0x282,0x285,0x288,0x28b,0x28e,0x291,0x294,0x297,0x29a,0x29d,0x2a0,0x2a3,0x2a6,0x2a9,0x2ac,
0x2af,0x2b2,0x2b5,0x2b8,0x2bb,0x2be,0x2c0,0x2c3,0x2c6,0x2c9,0x2cc,0x2cf,0x2d2,0x2d5,0x2d7,0x2da,0x2dd,0x2e0,0x2e3,0x2e6,
0x2e8,0x2eb,0x2ee,0x2f1,0x2f4,0x2f6,0x2f9,0x2fc,0x2fe,0x301,0x304,0x307,0x309,0x30c,0x30f,0x311,0x314,0x317,0x319,0x31c,
0x31e,0x321,0x324,0x326,0x329,0x32b,0x32e,0x330,0x333,0x335,0x338,0x33a,0x33d,0x33f,0x342,0x344,0x347,0x349,0x34b,0x34e,
0x350,0x353,0x355,0x357,0x35a,0x35c,0x35e,0x360,0x363,0x365,0x367,0x369,0x36c,0x36e,0x370,0x372,0x374,0x376,0x379,0x37b,
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章