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.

[参考译文] CCS/MSP430F5438:将端口和引脚设置为输入

Guru**** 2589275 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/629677/ccs-msp430f5438-setting-up-ports-and-pins-as-inputs

部件号:MSP430F5438

工具/软件:Code Composer Studio

我对编程完全陌生,以前从未使用过CSS。 我只是想把WFP 2.6 和WFP 2.7 作为投入。

要将这些设置为输入,我应该写什么?

谢谢

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    如用户指南的12.2 Tm3节所示,您必须清除PxDIR寄存器的相应位:

    P2DIR &=~(BIT6 + BIT7); 

    (重置后,这些位的默认值为零。)