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.
大家好。我想咨询下QEP的捕获定时器能否只在计数至最大值后复位呢?谢谢
应该是可以将定时器清零让重新计算 这样可以确保两次捕获的值
总是后面的大于前面的 做差既可以计算转速
最简单的办法是 后一次捕获和前一次捕获值做判断 如果后一次大于前一次
做差求速度 如果后一次小于前一次 说明溢出 做差后加0xffffffff即可