资源描述:
《《led动态双显示》doc版》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
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,