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/MSP432P401R:如何知道哪个引脚和端口对应于 LED 灯?

Guru**** 2546140 points


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

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/590447/ccs-msp432p401r-how-do-i-know-which-pin-and-port-correspond-to-the-led-light

器件型号:MSP432P401R

工具/软件:Code Composer Studio

在这里是新手。 也是初次使用 MSP。 我正在查看用于使 LED 闪烁的示例代码

int main (空)

  volatile uint32_t i;

  //停止看门狗计时器

  WDT_A_HOLD (WDT_A_base);

  //将 P1.0设置为输出方向

  GPIO_setAsOutputPin (

    GPIO_PORT_P1、

    GPIO_PIN0

    );

  while (1)

  {

    //切换 P1.0输出

    GPIO_toggleOutputOnPin (

      GPIO_PORT_P1、

GPIO_PIN0

);

    //延迟

    for (i=100000;i>0;i--);

  }

因此您可以看到端口1和引脚0已选定。 如何知道哪个端口/引脚对应于 LED?

这又意味着什么?  WDT_A_HOLD (WDT_A_base);  

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

    原理图中找到的、只需一个。 它也印在电路板的丝印上。

    红色 LED 亮起1.0、RGB LED 亮起2.0、2.1和2.2

    WDT 会关闭看门狗计时器。 WDT 是一项安全功能。 您安排在代码中经常发出 WDT 信号。 如果 WDT 没有看到该信号、它将重置机器。