#include"reg52.h"
typedef unsigned char u8;
typedef unsigned int u16;
sbit beep=P1^5;
void delay(u16 i)
{
while(i--);
}
void main()
{
while(1)
{
beep=~beep;
delay(1000);//控制音调频率
beep=~beep;/控制声音大小
delay(10);
}
}