对应程序:

#include

#define uint unsigned int

#define uchar unsigned char

uchar code tab[]={

0x81,

0x42,

0x24,

0x18,

};

void delay(uint z)

{

uint i,j;

for(i=z;i>0;i--)

for(j=120;j>0;j--);

}

void init()

{

P0=0x00;

}

c51流水灯仿真与程序