Angular Timer Capture/Compare

The Angular Timer Peripheral offers both a Capture feature and a 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 set up by their respective Angular Timer Capture/Compare Control (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. This can be used to determine the angle of the input signal for further calculation in the main algorithm.

atcapture.png

Compare Mode

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

atcompare.png
© 2024 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
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.