摘要
PWM(脉冲宽度调制)技术的应用很广,它可以控制灯光的亮度、控制直流电机的转速、输出语音信号等。在实际的应用中,经常使用51单片机来实现PWM。对于不具有硬件PWM模块的51单片机,需要通过软件算法来实现PWM,该文提出2种实现PWM的控制算法:软件延时的方法和定时器中断的方法。
PWM(Pulse Width Modulation)technology is widely used.It can control the brightness of lights,control the speed of DC motors,and output voice signals.In practical applications,51 MCUs are often used to realize PWM.For 51 MCUs without hardware PWM module,it is necessary to implement PWM through software programming.This article proposes two programming for implementing PWM:software delay and timer delay.
作者
杨宇
YANG Yu(Electrical and Mechanical Engineering School,Kunming Metallurgy College,Kunming 650033,China)
出处
《有色金属设计》
2021年第3期71-73,共3页
Nonferrous Metals Design