#include <reg52.h>
sbit beep = P2^3;
sbit led1 = P1^0;
sbit led2 = P1^1;
sbit led3 = P1^2;
sbit led4 = P1^3;
sbit led5 = P1^4;
sbit led6 = P1^6;
//char led[]={0xfe,0xfd,0xfb,0xf7,0xef,0xbf,0x7f};
void delay_10us(int ten_us)
{
while(ten_us--);
}
void main()
{
while (1)
{
led1 = 0;
delay_10us(100000);
beep = 1;
delay_10us(100000);
led1= 1;
delay_10us(100000);
beep=1;
delay_10us(100000);
led2 = 0;
delay_10us(100000);
beep = 1;
delay_10us(100000);
led2= 1;
delay_10us(100000);
beep=0;
delay_10us(100000);
}
}