摘要
通过单片机扩展8254计数器、采用变周期算法实现电机转速的高精度和实时测量。介绍了测速电路组成及8254的主要工作方式和控制命令;分析了测频率法和测周期法两种转速测量方法的理论误差,结合单片机系统特点和具体的测量要求,把测速范围分为高低两个区间,应用不同的8254工作状态,使测量结果完全满足精度需求,具有占系统资源少、算法简单和反应快的特点。
The speed measurement circuit is typically composed of a microcontroller and 8254 Interval timer, and the alterable sample periods algorithm is applied, which could realize high-accurate and real-time measurements. The modes and control words of 8254 timer are introduced. Two measurement algorithm are compared, a simplified method based on the characteristics of microcontrollers and the measurement specifications is proposed, which had the features of less resources occupation, simple algorithm and alterable modes of 8254 timer as the motor speed changing.
出处
《机械制造与自动化》
2007年第4期104-106,共3页
Machine Building & Automation
关键词
电机转速测量
单片机
8254计数器
motor speed measurement
microcontroller
8254 interval timer