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.

[参考译文] MSP430G2553:事件计数器

Guru**** 2562120 points


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

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/680556/msp430g2553-event-counter

器件型号:MSP430G2553

您好!

有人能帮我将 TimerA 配置为简单的事件计数器吗? 我已经尝试过这种方法、但当我切换 P1.0时、我看不到 TACCR0递增:

TA0CTL = tassel_3 + MC_2; // INCLK、
TA0CCTL0 = CM_1 + CCIS_0 + CAP; //边缘触发
器 P1SEL |= BIT0;// TA0CLK = INCLK???

谢谢你。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    您应该检查 TAR 中的事件计数。 不是 TACCR0。 查看并理解 MSP430x2xx 系列指南中的图12-1。

    第1行-使用 TASSEL 0 -请参阅2553数据表表表表12。 INCLK 用于 Pinosc。
    -使用 TACLR 清除 TAR
    -使用 MC 2. 最多可计数到0xFFFF

    第2行-不需要、因为我们选择了 MC 2

    第3行-正确、请参阅2553数据表表表表16


    ---- 然后检查 TAR -对于 P1.0上的每个正边沿、它应该增加一个


    (如果此答案有效、请单击按钮)