- Category:
- SCM
- Tags:
-
- File Size:
- 1kb
- Update:
- 2017-08-12
- Downloads:
- 0 Times
- Uploaded by:
- 春雨
Description: #define uint unsigned int
#define uchar unsigned char
sbit dula=P0^1;
sbit wela=P0^3;
uchar num;
uchar code table[]={
0xc0,0xf9,0xa4,0xb0,
0x99,0x92,0x82,0xf8,
0x80,0x90,0x88,0x83,
0xc6,0xa1,0x86,0x8e};
void delay(uint z);
void main()
{
wela=1;
P2=0x3f;
wela=0;
while(1)
{
for(num=0;num<16;num++)
{
dula=1;
P2=table[num];
dula=0;
delay(1000);
}
}
dula=1;
P2=0x0;
dula=0;
while(1);
}
void delay(uint z)
{
uint x,y;
for(x=z;x>0;x--)
for(y=110;y>0;y--);
To Search:
File list (Check if you may need any files):
新建文件夹 (2)
新建文件夹 (2)\smg.zip
新建文件夹 (2)\流水灯.zip