P1.3通过S2按下是接地,再按下S2之前,先将P1.3上拉,按下S2后,P1.3为0,松手后P1.3依旧为0(已检测P1.3在按下按键前后的电压),为何?是因为刚开始设置P1.3为输入,按下S2相当于命令P1.3=0,而后面没有P1.3=1的指令吗?S2松手不能看做是一条类似P1.3=1的指令?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.