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.

[参考译文] MSP430FR2311:端口写入和读取

Guru**** 2540720 points


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

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/587201/msp430fr2311-port-write-and-read

器件型号:MSP430FR2311

假设我已将 P1OUT = BIT0写入为高电平。 另一方面、我能否读取同一 PIN0 (BIT0)的状态
向该引脚写入1后的状态?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    没有 PIN0寄存器。 但是、如果您是指 P1IN 寄存器、那么您确实可以从它读取当前引脚状态。
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    抱歉、我是指 BIT0的 P1IN。
    我如何阅读您能给我一个想法?
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    IF (P1IN 和 BIT0){
    //高
    }否则{
    //低
    } 
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    谢谢主席先生
    它在工作