新聞中心

EEPW首頁 > 嵌入式系統(tǒng) > 設計應用 > Tm1639匯編驅動程序

Tm1639匯編驅動程序

作者: 時間:2016-11-29 來源:網(wǎng)絡 收藏
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){};
上一頁 1 2 下一頁

關鍵詞: Tm1639匯編驅

評論


技術專區(qū)

關閉