文件名称:DSP-pwm-
介绍说明--下载内容均来自于网络,请自行研究使用
为了产生一个PWM信号,DSP的定时器定时周期应该和PWM的周期相等。另外需要对DSP的EVA/EVB模块中的比较单元的比较寄存器设定数值,这样该数值一直与定时器的计数器值相比较,按照一定的比较方式,PWM即产生跳变。通过此种方式,DSP的PWM管脚就会产生一个宽度与比较寄存器数值成比例的脉冲信号。在定时器重复定时的过程中就产生了PWM信号。
使用DSP比较单元产生PWM波形不需要硬件连接图,只需对DPS的相关寄存器进行配置就可以在输出端得到相应的PWM波形,其具体操作过程如下:
1设置比较方式控制寄存器ACTRx
2如有必要,使能死区功能,配置死区控制寄存器DBTCONx
3对比较寄存器CMPRx赋值
4设置定时器寄存器T1CON(T3CON)并启动定时
5通过更新CMPRx的数值改变PWM占空比的大小
-n order to generate a PWM signal, DSP timer timer and PWM cycle period should be equal. In addition the need for DSP s EVA/EVB module compare unit compare register setting values, so that the value and the timer counter value has been compared by some comparisons, PWM that generate transition. In this way, DSP s PWM pin will generate a value of compare register width is proportional to the pulse signal. Repeated regularly in the course of the timer to generate a PWM signal.
Compared using the DSP hardware unit generates PWM waveforms do not need connection diagram, only the relevant registers of the DPS can be configured to obtain the corresponding PWM output waveform, the specific operation is as follows:
Comparison of mode control register 1 set ACTRx
2 If necessary, enable the dead zone function, the configuration control register DBTCONx dead
3 on the comparison registers CMPRx assignment
4 Set the timer register T1CON (T3CON) and start the timer
5, the value changes by upd
使用DSP比较单元产生PWM波形不需要硬件连接图,只需对DPS的相关寄存器进行配置就可以在输出端得到相应的PWM波形,其具体操作过程如下:
1设置比较方式控制寄存器ACTRx
2如有必要,使能死区功能,配置死区控制寄存器DBTCONx
3对比较寄存器CMPRx赋值
4设置定时器寄存器T1CON(T3CON)并启动定时
5通过更新CMPRx的数值改变PWM占空比的大小
-n order to generate a PWM signal, DSP timer timer and PWM cycle period should be equal. In addition the need for DSP s EVA/EVB module compare unit compare register setting values, so that the value and the timer counter value has been compared by some comparisons, PWM that generate transition. In this way, DSP s PWM pin will generate a value of compare register width is proportional to the pulse signal. Repeated regularly in the course of the timer to generate a PWM signal.
Compared using the DSP hardware unit generates PWM waveforms do not need connection diagram, only the relevant registers of the DPS can be configured to obtain the corresponding PWM output waveform, the specific operation is as follows:
Comparison of mode control register 1 set ACTRx
2 If necessary, enable the dead zone function, the configuration control register DBTCONx dead
3 on the comparison registers CMPRx assignment
4 Set the timer register T1CON (T3CON) and start the timer
5, the value changes by upd
(系统自动生成,下载前可以参看下载内容)
下载文件列表
DSP的pwm程序.doc