新聞中心

EEPW首頁(yè) > 嵌入式系統(tǒng) > 設(shè)計(jì)應(yīng)用 > Tm1639匯編驅(qū)動(dòng)程序

Tm1639匯編驅(qū)動(dòng)程序

作者: 時(shí)間:2016-11-29 來(lái)源:網(wǎng)絡(luò) 收藏
void zhongduan()interrupt 3{shizhong();}void shizhong(){static uint16 count=0;static uint16 scount=0;static uint8 a=0;static uint8 b=0;static uint8 c=0;static uint8 d=0; static uint8 x=0;static uint8 y=0;TH1=0xb8;TL1=0x00;count++;if(count==5){count=0;scount++;x=scount/10%10;y=scount/100%10; xianshi(7,x,LEVEL_11);if(scount%600==0){xianshi(6,0,LEVEL_11);scount=0;a++;}else xianshi(6,y,LEVEL_11);if(a>=10){a=0;b++;}xianshi(4,a,LEVEL_11);if(b>=6){b=0;c++;}xianshi(3,b,LEVEL_11);if(d<2){if(c==10){c=0;d++;}xianshi(1,c,LEVEL_11);xianshi(0,d,LEVEL_11);}else if(d>=2){if(d>2)d=0;if(c==4){c=0;d=0;}xianshi(1,c,LEVEL_11);xianshi(0,d,LEVEL_11);}KeyRead(&key);if(key==0x0008)a++;KeyRead(&key);if(key==0x0080)b++;KeyRead(&key);if(key==0x0800)c++;KeyRead(&key);if(key==0x8000)d++;if(key==0x0004){scount=0;x=0;y=0;}}}main(){ql();jishi();while(1){};
上一頁(yè) 1 2 下一頁(yè)

關(guān)鍵詞: Tm1639匯編驅(qū)

評(píng)論


技術(shù)專(zhuān)區(qū)

關(guān)閉