8 Capture/Compare/PWM (CCP)

The CCP has three modes—Capture, Compare or Pulse-Width Modulation (PWM). The Capture/Compare modes utilize TMR1 (16 bits), while PWM utilizes TMR2 (eight bits + two internal bits).

The Capture mode stores the value in TMR1 when a rising or falling event occurs (depending on operating mode). The Compare mode generates an output when the value in TMR1 matches the set value in the CCP. For PWM mode, TMR2 is eight bits, but the CCP extends it to ten bits using the internal oscillator’s prescaler bits.