廣告屏程序+仿真圖
51hei.png (11.26 KB, 下載次數(shù): 47)
下載附件
2021-9-2 19:44 上傳
QQ截圖20180408211300.png (20.28 KB, 下載次數(shù): 72)
下載附件
2018-4-8 21:16 上傳
單片機(jī)源程序如下:
- #include <reg52.h>
- unsigned char code
- tab[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f} ;
- unsigned char code digittab[21][8]={
- {0x00,0x7c,0x42,0x42,0x7c,0x40,0x40,0x40},
- {0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00}, //0
- {0x00,0x00,0x3c,0x24,0x24,0x3c,0x00,0x00}, //1
- {0x00,0x7e,0x42,0x42,0x42,0x42,0x7e,0x00}, //2
- {0xff,0x81,0x81,0x81,0x81,0x81,0x81,0xff}, //3
- {0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0xff,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0xff,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff},
- {0x00,0x00,0x00,0x00,0x00,0xff,0x00,0x00},
- {0x00,0x00,0x00,0xff,0x00,0x00,0x00,0x00},
- {0x00,0xff,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x80},
- {0x04,0x02,0x01,0x00,0x00,0x80,0x40,0x20},
- {0x10,0x08,0x04,0x82,0x41,0x20,0x10,0x08},
- {0x80,0x40,0x20,0x10,0x08,0x04,0x02,0x01},
- {0x10,0x08,0x04,0x82,0x41,0x20,0x10,0x08},
- {0x04,0x02,0x01,0x00,0x00,0x80,0x40,0x20},
- {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x80},
- {0x00,0x7e,0x81,0x81,0x81,0x81,0x7e,0x00},
- };
- unsigned int timecount;
- unsigned char cnta;
- unsigned char cntb;
- void main(void)
- {
- TMOD=0X01;
- TH0=(65536-3000)/256;
- TL0=(65536-3000)%256;
- TR0=1;
- ET0=1;
- EA=1;
- while(1)
- {;
- }
- }
- void t0(void) interrupt 1 using 0
- {
- TH0=(65536-3000)/256;
- TL0=(65536-3000)%256;
- P3=tab[cnta];
- P1=digittab[cntb][cnta];
- cnta++;
- if(cnta==8)
- {
- cnta=0;
- }
- timecount++;
- if(timecount==333)
- {
- timecount=0;
- cntb++;
- if(cntb==21)
- {
- cntb=0;
- }
- }
- }
復(fù)制代碼
51hei.png (5.12 KB, 下載次數(shù): 44)
下載附件
2021-9-2 19:46 上傳
所有資料51hei提供下載:
廣告屏.rar
(15.59 KB, 下載次數(shù): 53)
2018-4-8 21:14 上傳
點(diǎn)擊文件名下載附件
下載積分: 黑幣 -5
|