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.

msp430 G2553单片机如何配置输入的引脚在没有外界输入时恒为高电平?



如,我把P1.4~1.7设置为输入端口,怎么让它在无输入时恒为高电平呢?新手求教

  • 最好外接一个上拉电阻。 虽然g2553可以通过配置寄存器来配置上拉和下拉电阻,PxREN 寄存器控制拉电阻是否启用,而 PxOUT 决定了拉电阻是上拉 还是下拉,但上点复位时要重新配置寄存器,在配置前不能保证恒为高电平