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

PIC18F25J10-I/SS 参数 Datasheet PDF下载

PIC18F25J10-I/SS图片预览
型号: PIC18F25J10-I/SS
PDF下载: 下载PDF文件 查看货源
内容描述: 28 /40/ 44引脚高性能, RISC微控制器 [28/40/44-Pin High-Performance, RISC Microcontrollers]
分类和应用: 微控制器和处理器外围集成电路光电二极管PC时钟
文件页数/大小: 368 页 / 5652 K
品牌: MICROCHIP [ MICROCHIP ]
 浏览型号PIC18F25J10-I/SS的Datasheet PDF文件第135页浏览型号PIC18F25J10-I/SS的Datasheet PDF文件第136页浏览型号PIC18F25J10-I/SS的Datasheet PDF文件第137页浏览型号PIC18F25J10-I/SS的Datasheet PDF文件第138页浏览型号PIC18F25J10-I/SS的Datasheet PDF文件第140页浏览型号PIC18F25J10-I/SS的Datasheet PDF文件第141页浏览型号PIC18F25J10-I/SS的Datasheet PDF文件第142页浏览型号PIC18F25J10-I/SS的Datasheet PDF文件第143页  
PIC18F45J10 FAMILY  
15.4.1  
PWM PERIOD  
15.4 Enhanced PWM Mode  
The PWM period is specified by writing to the PR2  
register. The PWM period can be calculated using the  
following equation.  
The Enhanced PWM mode provides additional PWM  
output options for a broader range of control applica-  
tions. The module is a backward compatible version of  
the standard CCP module and offers up to four outputs,  
designated P1A through P1D. Users are also able to  
select the polarity of the signal (either active-high or  
active-low). The module’s output mode and polarity are  
configured by setting the P1M<1:0> and CCP1M<3:0>  
bits of the CCP1CON register.  
EQUATION 15-1:  
PWM Period = [(PR2) + 1] • 4 • TOSC •  
(TMR2 Prescale Value)  
PWM frequency is defined as 1/[PWM period]. When  
TMR2 is equal to PR2, the following three events occur  
on the next increment cycle:  
Figure 15-1 shows a simplified block diagram of PWM  
operation. All control registers are double-buffered and  
are loaded at the beginning of a new PWM cycle (the  
period boundary when Timer2 resets) in order to  
prevent glitches on any of the outputs. The exception is  
the PWM Dead-Band Delay register, ECCP1DEL,  
which is loaded at either the duty cycle boundary or the  
period boundary (whichever comes first). Because of  
the buffering, the module waits until the assigned timer  
resets instead of starting immediately. This means that  
Enhanced PWM waveforms do not exactly match the  
standard PWM waveforms, but are instead offset by  
one full instruction cycle (4 TOSC).  
• TMR2 is cleared  
• The CCP1 pin is set (if PWM duty cycle = 0%, the  
CCP1 pin will not be set)  
• The PWM duty cycle is copied from CCPR1L into  
CCPR1H  
Note:  
The Timer2 postscaler (see Section 13.0  
“Timer2 Module”) is not used in the  
determination of the PWM frequency. The  
postscaler could be used to have a servo  
update rate at a different frequency than  
the PWM output.  
As before, the user must manually configure the  
appropriate TRIS bits for output.  
FIGURE 15-1:  
SIMPLIFIED BLOCK DIAGRAM OF THE ENHANCED PWM MODULE  
CCP1CON<5:4>  
P1M1<1:0>  
CCP1M<3:0>  
4
Duty Cycle Registers  
2
CCPR1L  
CCP1/P1A  
CCP1/P1A  
P1B  
TRISx<x>  
TRISx<x>  
TRISx<x>  
TRISx<x>  
CCPR1H (Slave)  
Comparator  
P1B  
Output  
Controller  
R
S
Q
P1C  
P1C  
P1D  
(Note 1)  
TMR2  
P1D  
Comparator  
PR2  
Clear Timer,  
set CCP1 pin and  
latch D.C.  
ECCP1DEL  
Note: The 8-bit TMR2 register is concatenated with the 2-bit internal Q clock, or 2 bits of the prescaler, to create the 10-bit  
time base.  
© 2009 Microchip Technology Inc.  
DS39682E-page 137