logo - 刷刷题
下载APP
【单选题】

51 单片机P3^2口外接按键,按下一次键后,P2口输出的是( )。 #include"reg52.h" sbitP32=P3^2; voidmain() { IT0=1;// 外部中断0连沿触发方式 EX0=1;// 使能外部中断0 EA=1; // 开部中断 while(1) ; } voidint0() interrupt 0 // 外部中断0程序入口 { static unsigned char Bit=0; Bit++; if(Bit>=4)Bit =0; switch(Bit) { case 0: P2 = 0xf7; break; case 1:P2 = 0xef; break; case 2:P2 = 0xdf; break; case 3:P2 = 0xbf; break; } }

A.
0xf7
B.
0xef
C.
0xdf
D.
0xbf
举报
参考答案:
参考解析:
.
刷刷题刷刷变学霸