The invention relates to a method and a system for generating a PWM pulse wave on a microcontroller. This method sets the cycle and the pulse width of PWM wave by cycle and pulse width register register, counter separately on the PWM wave cycle and pulse counter, counter overflow signal after PWM wave of the value of the corresponding turnover, resulting in a predefined PWM pulse, when the PWM complementary output, first produced the main road through a PWM wave. Another way the inverter produces complementary PWM wave, setting dead time register, set the value of the dead time, the rise of two PWM wave respectively along the delay of a dead time width, so that the two complementary PWM wave into the dead time. The invention makes the microcontroller have the controllability of power driving and greatly improves the performance of the microcontroller.
【技术实现步骤摘要】
本专利技术涉及一种基于Intel MCS-51指令体系的微控制器片上PWM脉冲波产生方法及系 统,可应用于基于8051指令体系的单片微控制器,亦可应用于其它微控制器、微处理器等领 域。
技术介绍
脉宽调制(PWM Pulse Width Modulation)是一种可为电机,加热器甚至是音响等设备提 供数字控制方法的技术,即产生一种可调占空比,相位,周期的波形用在电机驱动、D/A变 换、电源控制等场合。PWM控制技术以其控制简单、灵活和动态响应好的优点而成为电力电 子技术最广泛应用的控制方式,也是人们研究的热点。PWM脉冲波的产生方式1) 分立电子元件组成的PWM信号发生器这种方法是用分立的逻辑电子元件组成PWM信号电路。它是最早期的方式,现在已经被 淘汰。2) 软件模拟法利用单片机的I/O引脚,通过软件对该引脚不断地输出高低电平来实现PWM波输出。 这种方法要占用CPU大量时间,使单片机无法进行其它的工作,因此也逐渐被淘汰。3) 专用PWM集成电路从PWM控制技术出现之日起,就有芯片制造商生产专用的PWM集成电路芯片。4) 单片机的PWM 口 。由于基于Int ...
【技术保护点】
一种微控制器片上PWM脉冲波产生方法,其特征在于兼容Intel MCS-51指令体系,能够产生两路独立的PWM波和两路互补的PWM波;其具体操作步骤为: 1)设置PWM波脉宽和周期,用于定义PWM波的周期和占空比; 2)设置分频器,用于向定时/计数器提供计数时钟; 3)设置定时/计数器,用于对PWM波脉宽和周期计数; 4)设置PWM波产生单元,产生两路互补PWM波; 5)设置死区时间寄存器,使互补的两路PWM波插入死区时间。
【技术特征摘要】
【专利技术属性】
技术研发人员:胡越黎,徐晓勇,闫科,朱卫,汪炜,
申请(专利权)人:上海大学,
类型:发明
国别省市:31[中国|上海]
还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。