#include<reg52.h>
#define uint unsingned int
#define uchar unsigned char
void delay_ms(uint z)
{
uchar i,j;
for(i=z;i>0;i--)
for(j=115;j>0;j--);
}
void main()
{
while(1)
{
P1=0xe7;
delay_ms(100);
P1=0xdb;
delay_ms(100);
P1=0xbd;
delay_ms(100);
P1=0x7e;
delay_ms(100);
}
} |