#include
#define uchar unsigned char
#define uint unsigned int
sbit bo_xing=P1^0;
uint time=0;
bit flg=0;
void InitTimer0(void)
{ TMOD = 0x01;
TH0 = 0x0FC;
TL0 = 0x18;
EA = 1;
ET0 = 1;
TR0 = 1;
}void main(void)
{
bo_xing=0;
InitTimer0();
while(1)
{
flg=1;
if(time==0)
bo_xing=1;
if(time==10)
bo_xing=0;
if(time==15)
bo_xing=1;
if(time==35)
bo_xing=0;
if(time==40)
bo_xing=1;
if(time==60)
bo_xing=0;
if(time==65)
bo_xing=1;
if(time==75)
{
flg=0;
time=0;
bo_xing=0;
}
}
}
void Timer0Interrupt(void) interrupt 1
{
TH0 = 0x0FC;
TL0 = 0x18;
if(flg)
time++;
}