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.
我写了一个控制数码管的程序,为什么P1口可以控制,而P2口控制不对呢
这个要看你用的哪个型号的单片机了,你看看手册,P2是否有上拉电阻,需要使能上拉电阻,MSP430使能上拉电阻的寄存器名字一般是REN,你看看。