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/MSP430G2553:按钮编程

Guru**** 2576195 points


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

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/669990/ccs-msp430g2553-button-programming

器件型号:MSP430G2553

工具/软件:Code Composer Studio

如何以这样的方式进行编程 、在按下按钮之前、LED 最初应处于关闭状态?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    您好、Chidambaram、
    我将初始化 LED 的 GPIO 低电平、并使用按钮的中断将 LED 设置为高电平。
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    查看这2个示例。 您将需要将它们连接到用于按钮的引脚。 我认为第二个问题更接近您所寻找的问题。

    轮询:
    dev.ti.com/.../

    使用中断:
    dev.ti.com/.../