Angular Timer Capture/Compare

The Angular Timer Peripheral offers both Capture and Compare feature. These can be used to check the status of the angular timer registers or to react to a specific phase angle. The angular timer contains multiple built-in capture/compare modules that can be used. The Capture/Compare options are enabled and setup by their respective ATxCCONy registers.

The CCyMODE bit of the ATxCCONy register controls whether each particular module is in Capture or Compare mode. The polarity of each module's respective output signal is controlled by the CCyPOL bit of the ATxCCONy. Both modes use an edge detect that is synced to the input clock of the angular-timer module.

Capture Mode

In Capture Mode the software has the ability to retrieve the status of the phase counter. For example, this can be used to determine the angle of the input signal for further calculation in the main algorithm.


Compare Mode

The Compare Mode can trigger an output signal and interrupt, if enabled, when the phase counter matches a preset value. This can be helpful, for example, when an event needs to occur at a specific phase angle.

© 2017 Microchip Technology, Inc.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.