引用第1楼ehco于2011-12-16 20:42发表的 :电路有误,一般IO口接上拉电阻到VCC,开关接地按下开关后IO变成0电平那么可以这样写sbit key=P1^0;sbit LED=P1^1;.......