[Menu]>[Guide to use the PIC]>[873 Hardware]>[SFR]


SFR explanation for PIC16F873(13)

CCP2CON ( CCP2 Control Register ) 1Dh
    This register controls the condition of CCP2 feature.
The value in the parenthesis is in the condition immediately after the turning on.

CCP2X,CCP2Y : PWM Least Significant bits
These bits designate low 2 bits of duty cycle of PWM.

As for the operation of the CCP, refer to CCP feature of PIC16F873.

CCP2M3,CCP2M2,CCP2M1,CCP2M0 : CCP1 Mode Select bits
CCP2
M3
CCP2
M2
CCP2
M1
CCP2
M0
CCP2 mode
0000CCP off
0100Capture mode : every falling edge
0101Capture mode : every rising edge
0110Capture mode : every 4th rising edge
0111Capture mode : every 16th rising edge
1000Compare mode : set output on match
1001Compare mode : clear output on match
1010Compare mode : generate software interrupt on match
1011Compare mode : trigger special event, resets TMR1 and start A/D conversion
11xxPWM mode










CCPR2L,CCPR2H ( CCP2 register ) 1Bh, 1Ch
    This register is used when operating data by the operation of the CCP. The use changes with each mode.
    As for the operation of the CCP, refer to CCP feature of PIC16F873.
Capture mode

The contents of timer1 are stored at the time of the capture.
It combines and uses both registers as the 16 bits register.
Compare mode

It sets the data to compare with timer1.
It combines and uses both registers as the 16 bits register.
PWM mode

It sets data for the duty to CCPR2L.
CCPR2H is used for the processing inside and is a read-only register.