- 註冊時間
- 2006-1-29
- 最後登錄
- 2022-8-18
- 主題
- 查看
- 積分
- 72
- 閱讀權限
- 30
- 文章
- 35
- 相冊
- 0
- 日誌
- 0
狀態︰
離線
|
#include <reg51.h>
int da1[8]={0xf3,0xf3,0xf3,0xf3,0xe3,0xff,0xff,0xff};
int da2[8]={0x8f,0x87,0xe3,0xf3,0xe3,0xff,0xff,0xff};
int da3[8]={0x07,0x83,0xf3,0x90,0x00,0x00,0x90,0xf3};
int da4[8]={0xff,0xff,0xff,0x80,0x00,0x3e,0x3f,0x3f};
sbit ul=P3^6;
sbit dl=P3^7;
delay(int d)
{
int i,j;
for (i=0;i<d;i++)
for (j=0;j<6;j++);
}
dptr()
{
int i,i2;
for (i=15;i>-1;i--)
{ P3=0xff;
P0=i;
if (i<8)
{ ul=1;dl=0;
delay(3);
P2=da1[7-i];
ul=0;dl=1;
delay(3);
P2=da2[7-i];
ul=0;dl=0;
}
else
{
ul=1;dl=0;
delay(3);
P2=da3[15-i];
ul=0;dl=1;
delay(3);
P2=da4[15-i];
ul=0;dl=0;
}
delay(10);
}
}
main()
{
while(1)
{
dptr();
}
}
=======
Program Size: data=75.0 xdata=0 code=397
creating hex file from "222"...
"222" - 0 Error(s), 3 Warning(s). 問題我看不懂 可以幫忙嗎 |
|