資源描述:
《《led動態(tài)雙顯示》doc版》由會員上傳分享,免費在線閱讀,更多相關(guān)內(nèi)容在應(yīng)用文檔-天天文庫。
1、/***************************************************************************文件名稱:main.c*文件說明:顯示"Hello"**************************************************************************/#include#defineTOP0//豎直方向零點#defineBOTTOM64//豎直方向坐標最大值#defineLEF
2、T0//水平方向坐標最小值#defineRIGHT128//水平方向坐標最大值#defineEN_WIDTH48//Hello字符串的長度#defineCH_WIDTH96//中文字符串的長度#defineOP_CHINESE1//選擇顯示中文字符#defineOP_ENGLISH2//選擇顯示英文字符unsignedintsec,sec1,sec2,min,min1,min2,hour,h1,h2,s_num,S_NUM,cont,b,c,d,e,a;unsignedcharshowData[][16
3、]={0x00,0x00,0xE0,0x0F,0x10,0x10,0x08,0x20,0x08,0x20,0x10,0x10,0xE0,0x0F,0x00,0x00,//00x00,0x00,0x10,0x20,0x10,0x20,0xF8,0x3F,0x00,0x20,0x00,0x20,0x00,0x00,0x00,0x00,//10x00,0x00,0x70,0x30,0x08,0x28,0x08,0x24,0x08,0x22,0x88,0x21,0x70,0x30,0x00,0x00,//20x
4、00,0x00,0x30,0x18,0x08,0x20,0x88,0x20,0x88,0x20,0x48,0x11,0x30,0x0E,0x00,0x00,//30x00,0x00,0x00,0x07,0xC0,0x04,0x20,0x24,0x10,0x24,0xF8,0x3F,0x00,0x24,0x00,0x00,//40x00,0x00,0xF8,0x19,0x08,0x21,0x88,0x20,0x88,0x20,0x08,0x11,0x08,0x0E,0x00,0x00,//50x00,0x
5、00,0xE0,0x0F,0x10,0x11,0x88,0x20,0x88,0x20,0x18,0x11,0x00,0x0E,0x00,0x00,//60x00,0x00,0x38,0x00,0x08,0x00,0x08,0x3F,0xC8,0x00,0x38,0x00,0x08,0x00,0x00,0x00,//70x00,0x00,0x70,0x1C,0x88,0x22,0x08,0x21,0x08,0x21,0x88,0x22,0x70,0x1C,0x00,0x00,//80x00,0x00,0x
6、E0,0x00,0x10,0x31,0x08,0x22,0x08,0x22,0x10,0x11,0xE0,0x0F,0x00,0x00,//90x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x30,0xC0,0x30,0x00,0x00,0x00,0x00,0x00,0x00,//:};unsignedcharpx,//顯示字符串的X位置py,//顯示字符串的Y位置width;//字符串的寬度unsignedcharshowData1[]={//16*8點陣的"Hello"0x0
7、0,0x80,0x00,0x60,0xFE,0x1F,0x22,0x02,0x22,0x02,0x22,0x02,0x22,0x02,0xFE,0x7F,0x22,0x02,0x22,0x02,0x22,0x42,0x22,0x82,0xFE,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,/*"用",0*///0x00,0x40,0x02,0x40,0x82,0x40,0x82,0x40,0x82,0x40,0x82,0x40,0x82,0x40,0xFE,0x7F,//0x82
8、,0x40,0x82,0x40,0x82,0x40,0x82,0x40,0x82,0x40,0x02,0x40,0x00,0x40,0x00,0x00,/*"王",0*///0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"",1*///0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,