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


SFR explanation for PIC16F873(12)
CCP1CON ( CCP1 Control Register ) 17h
    This register controls the condition of CCP1 feature.
The value in the parenthesis is in the condition immediately after the turning on.

CCP1X,CCP1Y : 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.

CCP1M3,CCP1M2,CCP1M1,CCP1M0 : CCP1 Mode Select bits
CCP1
M3
CCP1
M2
CCP1
M1
CCP1
M0
CCP1 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 and resets TMR1
11xxPWM mode





CCPR1L,CCPR1H ( CCP1 register ) 15h, 16h
    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.
Two registers are combined and works as a 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 CCPR1L.
CCPR1H is used for the processing inside and is a read-only register.




PR2 ( PWM period register ) 92h
    This register is used to set the period of the pulse signal by the PWM mode of the CCP.
The contents of the PR2 register and the value of timer 2 are compared and the period of the PWM output pulse is decided.

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