case 2: P1=0xfd; //第二个LED亮
break;
case 3:P1=0xfb; //第三个LED亮
break;
case 4:P1=0xf7; //第四个LED亮
break;
case 5:P1=0xef; //第五个LED亮
break;
case 6:P0=0xdf; //第六个LED亮
break;
case 7:P1=0xbf; //第七个LED亮
break;
case 8:P1=0x7f; //第八个LED亮
break;
default: //缺省值,关闭所有LED
P1=0xff;
}
}
}