#include
sbit led=P1^2; //定义端口为P1.2
void delay(unsigned int x) //延时函数,x为传递参数
{
unsigned char i;
while(x--)
{
for(i=0;i<120;i++);
#include
sbit led=P1^2; //定义端口为P1.2
void delay(unsigned int x) //延时函数,x为传递参数
{
unsigned char i;
while(x--)
{
for(i=0;i<120;i++);