#include <reg52.h>
sbit BEEP = P1^6;
void
delay_ms(unsigned
int
x)
{
unsigned
int
i,j;
if
(x==1000)
{
for
(i=0;i<19601;i++)
{
for
(j=5;j>0;j--);
}
}
else
while
(x--)
for
(j=115;j>0;j--);
}
void
main()
{
unsigned
int
i,
time
;
while
(1)
{
for
(
time
=0;
time
<800;
time
++)
{
BEEP=!BEEP;
for
(i=0;i<30;i++);
}
delay_ms(1000);
}
}