8*8點(diǎn)陣字移動(dòng)顯示程序
下面把剛學(xué)了的88點(diǎn)陣字移動(dòng)編一個(gè)程序送給選手們吧。祝福你們。也謝謝你們。為了國(guó)家爭(zhēng)得了榮耀。
本文引用地址:http://m.butianyuan.cn/article/201611/323755.htm8*8點(diǎn)陣的顯示原理詳見(jiàn):http://www.51hei.com/mcu/1798.html
程序:#include
#define uchar unsigned char
#define uint unsigned int
uchar numberx[]={
0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07};
uchar numbery[]={
0x1c,0x14,0x14,0xff,0x14,0x14,0x1c,0x00,
0xff,0xcb,0xcb,0xff,0xcb,0xeb,0xff,0x00,
0xff,0x06,0x1b,0x91,0x40,0x3f,0x40,0x80,
0x84,0x7f,0x84,0xfc,0x3c,0x24,0x3c,0x00,
0x89,0x52,0xf8,0xa8,0xff,0xa8,0xf8,0x00};
void delay( unsigned int z)
{
int i,j;
for(i=z;i>0;i--)
for(j=120;j>0;j--);
}
void main()
{int x,a,b;
while(1)
{
for(a=0;a<50;a++)
{
for(x=0;x<8;x++)
{
P0=numberx[x];
P1=numbery[x+b];
delay(2);
}
}
b++;
if(b>32)b=0;
}
}
評(píng)論