Angular Timer Overview

The Angular Timer peripheral allows the software designer to interpret repeating signals as an angle measurement versus a time measurement. A repeating signal is converted into a 360-degree-angular representation from which all measurements are based.

For example, a motor that is rotating can have a sensor at a single location to indicate a home position. That sensor will produce a pulse that repeats. In this case, it is easy to apply 360 degrees to this signal because the time it takes to repeat the signal can easily be divided into 360 pieces with each one degree of rotation matched to a time element. The Angular Timer handles the calculation automatically and will automatically adjust if the time between the sensor home pulses changes due to the motor speed changing.

angtmr.png

Some of the features of the Angular Timer include:

Specialized Rotational Timer

  • Runs independently of the core
  • Automatically generates output events based on user-defined angular intervals
  • Interrupts are generated based on angles

Simplified Code Development

  • Automatically adjusts for speed changes
  • Software development is in terms of degrees
  • Simplifies the math required

Angular Timer Modes

Four operating modes:

The Angular Timer also has capture-and-compare features that can be enabled to trigger interrupts at defined rotations. More information on the capture-and-compare features can be found on the "Angular Timer Capture/Compare" page.


The basic operation of the Angular Timer is derived from two input signals: an input clock selected by the Angular Timer Clock (ATxCLK) register, and an input signal selected by the Angular Timer Signal (ATxSIG) register. From these signals, three outputs are created:

  1. The period clock - outputs the controlling input signal.
  2. The phase clock - outputs any pulses in-between the input clock pulse at defined phase angles.
  3. The missing pulse detector - creates a pulse when a missing pulse is detected.
angtmr3.png
angtmr1.png

Zooming in on an Angular Timer setup for output every 90 degrees produces the waveform below:

angtmr2.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.