1.功能描述
2.程序
#include <REGX51.H>
#define uint unsigned int
#define uchar unsigned char
void delay(uint ms)
{
uchar i;
uint j;
for(j=0;j<ms;j++)
{
for(i=0;i<125;i++)
{
;
}
}
}
void main(void)
{
P1=0xfe;
delay(1000);
P1=0xfd;
delay(1000);
P1=0xfb;
delay(1000);
P1=0xf7;
delay(1000);
P1=0xef;
delay(1000);
p1=0xdf;
delay(1000);
P1=0xbf;
delay(1000);
p1=0x7f;
delay(1000);
}
3.电路图