PIC16C770 Microchip Technology Inc., PIC16C770 Datasheet - Page 58

no-image

PIC16C770

Manufacturer Part Number
PIC16C770
Description
18/20-pin, 8-bit Cmos Microcontrollers With 10/12-bit A/d
Manufacturer
Microchip Technology Inc.
Datasheet
PIC16C717/770/771
8.3
In Pulse Width Modulation (PWM) mode, the ECCP
module produces up to a 10-bit resolution PWM output.
Figure 8-3 shows the simplified PWM block diagram.
FIGURE 8-3:
8.3.1
The PWM period is specified by writing to the PR2 reg-
ister. The PWM period can be calculated using the fol-
lowing formula:
PWM frequency is defined as 1 / [PWM period].
When TMR2 is equal to PR2, the following three events
occur on the next increment cycle:
• TMR2 is cleared
• The CCP1 pin is set (exception: if PWM duty
• The PWM duty cycle is latched from CCPR1L into
DS41120B-page 56
cycle = 0%, the CCP1 pin will not be set)
CCPR1H
Note:
PWM
Note: 8-bit timer TMR2 is concatenated with 2-bit internal Q clock or 2 bits of the prescaler to create 10-bit time-base.
Duty cycle registers
CCPR1L
CCPR1H (Slave)
Comparator
PWM Mode
PR2
TMR2
PERIOD
Comparator
The Timer2 postscaler (see Section 7.0) is
not used in the determination of the PWM
frequency. The postscaler could be used to
have a servo update rate at a different fre-
quency than the PWM output.
PWM PERIOD
= [(PR2) + 1] • 4 • T
(Note 1)
(TMR2
Clear Timer,
CCP1 pin and
latch D.C.
SIMPLIFIED PWM BLOCK DIAGRAM
PRESCALE VALUE
CCP1CON<5:4>
R
S
OSC
Q
)
PWM1M1<1:0>
CONTROLLER
OUTPUT
P1DEL
2
CCP1/P1A
P1B
P1C
P1D
CCP1M<3:0>
4
TRISB<3>
TRISB<5>
TRISB<6>
TRISB<7>
2002 Microchip Technology Inc.
RB3/CCP1/P1A
RB5/SDO/P1B
RB6/T1OSO/T1CKI/
P1C
RB7/T1OSI/P1D

Related parts for PIC16C770