欧美极品高清xxxxhd,国产日产欧美最新,无码AV国产东京热AV无码,国产精品人与动性XXX,国产传媒亚洲综合一区二区,四库影院永久国产精品,毛片免费免费高清视频,福利所导航夜趣136
標題:
單片機點陣顯示實驗
[打印本頁]
作者:
zjy_
時間:
2021-1-10 13:49
標題:
單片機點陣顯示實驗
點陣顯示實驗
2.png
(197.54 KB, 下載次數: 31)
下載附件
2021-1-10 13:48 上傳
1.png
(203.09 KB, 下載次數: 27)
下載附件
2021-1-10 13:48 上傳
#include <reg51.h>
unsigned char code tab[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f};
unsigned char code digittab[10][8]={
{0x00,0x00,0x3e,0x41,0x41,0x41,0x3e,0x00}, //0
{0x00,0x00,0x00,0x00,0x21,0x7f,0x01,0x00}, //1
{0x00,0x00,0x27,0x45,0x45,0x45,0x39,0x00}, //2
{0x00,0x00,0x22,0x49,0x49,0x49,0x36,0x00}, //3
{0x00,0x00,0x0c,0x14,0x24,0x7f,0x04,0x00}, //4
{0x00,0x00,0x72,0x51,0x51,0x51,0x4e,0x00}, //5
{0x00,0x00,0x3e,0x49,0x49,0x49,0x26,0x00}, //6
{0x00,0x00,0x40,0x40,0x40,0x4f,0x70,0x00}, //7
{0x00,0x00,0x36,0x49,0x49,0x49,0x36,0x00}, //8
{0x00,0x00,0x32,0x49,0x49,0x49,0x3e,0x00} //9
};
unsigned int timecount; //
unsigned char lie; //
unsigned char shu; //
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
{
TH0=(65536-3000)/256;
TL0=(65536-3000)%256;
P3=tab[lie];
P0=digittab[shu][lie];
lie++;
if(lie==8) lie=0;
timecount++;
if(timecount==333)
{
timecount=0;
shu++;
if(shu==10) shu=0;
}
}
復制代碼
歡迎光臨 (http://www.raoushi.com/bbs/)
Powered by Discuz! X3.1