新聞中心

EEPW首頁 > 嵌入式系統(tǒng) > 設(shè)計(jì)應(yīng)用 > 點(diǎn)陣調(diào)試(附程序)

點(diǎn)陣調(diào)試(附程序)

作者: 時(shí)間:2016-11-28 來源:網(wǎng)絡(luò) 收藏




#include
#include

本文引用地址:http://butianyuan.cn/article/201611/322947.htm

#define uchar unsigned char
#define uint unsigned int

//端口定義;

sbit DS = P1^0;
sbit OE = P1^1;
sbit ST_CP = P1^2;
sbit SH_CP= P1^3;
sbit MR = P1^4;
uchar time=0;
uchar flag=0;

uchar codetableHng[8]={0x00,0x00,0x7E,0x42,0x7E,0x00,0x00,0x00};
uchar codetable1[8]={0x00,0x00,0x20,0x7E,0x00,0x00,0x00,0x00};
uchar codetable2[8]={0x00,0x00,0x66,0x4A,0x72,0x00,0x00,0x00};
uchar codetable3[8]={0x00,0x24,0x42,0x52,0x2C,0x00,0x00,0x00};
uchar codetable4[8]={0x00,0x0C,0x14,0x7E,0x04,0x00,0x00,0x00};
uchar codetable5[8]={0x00,0x00,0x72,0x52,0x5C,0x00,0x00,0x00};
uchar codetable6[8]={0x00,0x3C,0x52,0x52,0x4C,0x00,0x00,0x00};
uchar codetable7[8]={0x00,0x00,0x40,0x5C,0x60,0x00,0x00,0x00};
uchar codetable8[8]={0x00,0x00,0x7E,0x52,0x7E,0x00,0x00,0x00};
uchar codetable9[8]={0x00,0x30,0x4A,0x4A,0x3C,0x00,0x00,0x00};

uchar codetableLie[8]={0x7f,0xbf,0xdf,0xef,0xf7,0xfb,0xfd,0xfe};

void delayS(uchar ms)
{
uchar x,y;
for(x=ms;x--;x>0)
for(y=110;y>0;y--);
}

static void timer0_initialize(void)
{
EA=0;
TR0=0;
TMOD=TMOD&0xf0;
TMOD=TMOD|0x01;

TL0=(0X78);
TH0=(0X0C);
PT0=0;////
ET0=1;
TR0=1;
EA=1;
}


上一頁 1 2 下一頁

關(guān)鍵詞: 點(diǎn)陣調(diào)

評(píng)論


技術(shù)專區(qū)

關(guān)閉