#include <reg51.h>
#define LED P1 //宏定义,使用LED代替P1口(相当于LED=P1)
#define uchar unsigned char //用uchar代替unsigned char方便操作
#define uint unsigned int
/*------------------time ms延时函数-----------------*/
void delay_ms(uint time)
{
uchar tres;
for(;time>0;time--)
{
tres=;
while(tres--);
}
void in()
{
uchar t;
LED=0X01;//P1=B
while(1)//ˀѭ»·,²»ͣµĵぁº͏¨ðLED
{
for(t=0;t
温馨提示:答案为网友推荐,仅供参考