您好,欢迎访问三七文档
当前位置:首页 > 行业资料 > 酒店餐饮 > 8x8LED点阵显示数字
8x8LED点阵显示数字#includereg51.h#includeintrins.h#defineucharunsignedchar#defineuintunsignedintucharcodeTable_OF_Digits[]={0x00,0x3E,0x41,0x41,0x41,0x3E,0x00,0x00,0x00,0x00,0x00,0x21,0x7F,0x01,0x00,0x00,0x00,0x27,0x45,0x45,0x45,0x39,0x00,0x00,0x00,0x22,0x49,0x49,0x49,0x36,0x00,0x00,0x00,0x0C,0x14,0x24,0x7F,0x04,0x00,0x00,0x00,0x72,0x51,0x51,0x51,0x4E,0x00,0x00,0x00,0x3E,0x49,0x49,0x49,0x26,0x00,0x00,0x00,0x40,0x40,0x40,0x4F,0x70,0x00,0x00,0x00,0x36,0x49,0x49,0x49,0x36,0x00,0x00,0x00,0x32,0x49,0x49,0x49,0x3E,0x00,0x00,};uchari=0,t=0,Num_Index=0;voidmain(){P3=0x80;Num_Index=0;TMOD=0x00;TH0=(8192-2000)/32;TL0=(8192-2000)%32;TR0=1;IE=0x82;while(1);}voidLED_Screen_Display()interrupt1{TH0=(8192-2000)/32;TL0=(8192-2000)%32;P3=_crol_(P3,1);P0=~Table_OF_Digits[Num_Index*8+i];if(++i==8)i=0;if(++t==250){t=0x00;if(++Num_Index==10)Num_Index=0;}}
本文标题:8x8LED点阵显示数字
链接地址:https://www.777doc.com/doc-5715237 .html