Introduction

The Capture/Compare/PWM (CCP) module is a peripheral that allows the measurement and control of different events and also generates pulse-width modulated (PWM) output signals. In Capture mode, the module can be used to measure the duration of an event. Compare mode allows the user to trigger an external event after a predetermined amount of time has expired. PWM mode is used to generate pulsed output signals that may vary in frequency and duty cycle. This technical brief describes each of the three CCP modes.