#include <REGX51.H>
#define uchar unsigned char
uchar code table[]={
? ? ? ? ? ? ? ? ? 0x7f,0x3f,0x1f,0x0f,
? ? ? ? ? ? ? ? ? ? 0x07,0x03,0x01,0x00,
? ? ? ? ? ? ? ? ? 0x01,0x03,0x07,0x0f,
? ? ? ? ? ? ? ? ? 0x1f,0x3f,0x7f,0xff,
? ? ? ? ? ? ? ? ? ? 0xcc};
uchar i;
void delay(uchar ms);
void delay(uchar ms)
{
uchar i,j;
for(i=0;i<ms;i++)
for(j=0;j<125;j++)
;
}
void main(void)
{
while(1)
{
if(table[i]!=0xcc)
{
? P1=table[i];
i++;
delay(1000);
}
else
{
? i=0;
}
}?
}?
流程圖
總結(jié)
新的程序出現(xiàn)了一些問(wèn)題砚作,但在老師的指導(dǎo)下和同學(xué)的幫助下成功的完成了程序并成功的運(yùn)行。自己在程序的基礎(chǔ)上也改了一些東西乘粒,成功的做成不一樣的效果膜赃。