欢迎访问ic37.com |
会员登录 免费注册
发布采购

MPC82G516AD 参数 Datasheet PDF下载

MPC82G516AD图片预览
型号: MPC82G516AD
PDF下载: 下载PDF文件 查看货源
内容描述: 8位微控制器 [8-bit microcontroller]
分类和应用: 微控制器
文件页数/大小: 144 页 / 1527 K
品牌: MEGAWIN [ MEGAWIN TECHNOLOGY CO., LTD ]
 浏览型号MPC82G516AD的Datasheet PDF文件第68页浏览型号MPC82G516AD的Datasheet PDF文件第69页浏览型号MPC82G516AD的Datasheet PDF文件第70页浏览型号MPC82G516AD的Datasheet PDF文件第71页浏览型号MPC82G516AD的Datasheet PDF文件第73页浏览型号MPC82G516AD的Datasheet PDF文件第74页浏览型号MPC82G516AD的Datasheet PDF文件第75页浏览型号MPC82G516AD的Datasheet PDF文件第76页  
14.4.4 PWM Mode  
All of the PCA modules can be used as PWM outputs. The frequency of the output depends on the clock source  
for the PCA timer. All of the modules will have the same frequency of output because they all share the PCA  
timer.  
The duty cycle of each module is determined by the module’s capture register CCAPnL and the extended 9th bit,  
ECAPnL. When the 9-bit value of { 0, [CL] } is less than the 9-bit value of { ECAPnL, [CCAPnL] } the output will  
be low, and if equal to or greater than the output will be high.  
When CL overflows from 0xFF to 0x00, { ECAPnL, [CCAPnL] } is reloaded with the value of { ECAPnH,  
[CCAPnH] }. This allows updating the PWM without glitches. The PWMn and ECOMn bits in the module’s  
CCAPMn register must be set to enable the PWM mode.  
Using the 9-bit comparison, the duty cycle of the output can be improved to really start from 0%, and up to 100%.  
The formula for the duty cycle is:  
Duty Cycle = 1 – { ECAPnH, [CCAPnH] } / 256.  
Where, [CCAPnH] is the 8-bit value of the CCAPnH register, and ECAPnH (bit-1 in the PCAPWMn register) is 1-  
bit value. So, { ECAPnH, [CCAPnH] } forms a 9-bit value for the 9-bit comparator.  
For examples,  
a. If ECAPnH=0 & CCAPnH=0x00 (i.e., 0x000), the duty cycle is 100%.  
b. If ECAPnH=0 & CCAPnH=0x40 (i.e., 0x040) the duty cycle is 75%.  
c. If ECAPnH=0 & CCAPnH=0xC0 (i.e., 0x0C0), the duty cycle is 25%.  
d. If ECAPnH=1 & CCAPnH=0x00 (i.e., 0x100), the duty cycle is 0%.  
Figure 14-7. PCA PWM Mode  
MEGAWIN  
MPC82G516A Data Sheet  
72