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.

请问430g2553有计数器吗?有正交解码吗?

Other Parts Discussed in Thread: MSP430G2553

我想用它来处理码盘计数,但是码盘AB项输出正交脉冲,不知道g2553有没有计数器或者正交解码

  • Timer_A is a 16-bit timer/counter with three capture/compare registers. Timer_A can support multiple
    capture/compares, PWM outputs, and interval timing. Timer_A also has extensive interrupt capabilities.
    Interrupts may be generated from the counter on overflow conditions and from each of the
    capture/compare registers.
    Timer_A features include:
    • Asynchronous 16-bit timer/counter with four operating modes
    • Selectable and configurable clock source
    • Two or three configurable capture/compare registers
    • Configurable outputs with PWM capability
    • Asynchronous input and output latching
    • Interrupt vector register for fast decoding of all Timer_A interrupts

    TIMER_A可以作为计数模式。

  • C2000有QEP用于正交解码的专用外设,除此之外,大多数MCU都没有专门做正交解码的外设。MSP430G2553可以用捕捉或者外部IO中断的方式做正交解码。

  • 能够具体讲讲怎么用捕获和外部中断做正交解码吗?我捕获码盘的AB项,基本可以做到正反计数,只是如果码盘转速突然增大或者突然反向就会很不准确,能把您的代码实现写一下吗?

  • 那么对于码盘的脉冲(有AB项,也就是正交信号)计数器能够根据码盘的转向自动增减计数吗?如果能的话怎么实现呢?