基于单片机的数字脉宽调制器

Digital PWM Based on Single-chip Microcomputer

  • 摘要: 针对采用单片机2个定时器/计数器实现PWM存在资源不足的问题,提出了一种采用单片机单个定时器/计数器实现PWM的方法;给出了PWM信号的特点和MCS-51单片机定时器/计数器的特性,以控制液压比例阀的PWM为例,详细介绍了该方法的具体实现,并分析了该PWM的性能。分析结果表明,设计的PWM能够满足一般应用,解决了单片机中定时器/计数器资源不足的问题,但单片机中断响应时间对PWM信号的频率、相位精度与稳定度有一定的影响。

     

    Abstract: In view of resource problem caused by using two timers/counters of single-chip microcomputer to realize PWM, the paper proposed a method of using single timer/counter to realize PWM. It gave characteristics of PWM signal and timer/counter of MCS-51 single-chip microcomputer, and detailedly introduced implementation of the method by an example of PWM control of hydraulic proportion valve and analyzed performances of the PWM. The analyzing result showed that the PWM can meet with general application and solves problem of resource shortage of timers/counters in single-chip microcomputer, but frequency, phase accuracy and stability of PWM signal are influenced by interrupt response time in some degree.

     

/

返回文章
返回