Angular Timer (AngTMR_Angular Timer) is also known as an angular interval counter. It is a peripheral independent of the core, configured in some specialized, relatively high-end MCUs, such as PIC16F161X.
The Angular Timer can divide periodic signals into smaller time intervals and convert time-based signals into angle/phase-based signals. For example, the hour, minute, and second hands on a clock rotate at different speeds, each with its own rotation period. Regardless of which hand it is, the period value N can be divided into equal parts ( the larger N, the more accurate the angle positioning), and then by calculating the value of (1/4)*N, the corresponding angle for this time value is 90° (or close), which is at 3 o’clock. Therefore, AngTMR can convert time variables into position variables related to angles.
AngTMR can trigger interrupts at the end of each angular interval, with the number of interrupts based on how many angular intervals the user wants to divide each rotation period into (resolution). It can also trigger interrupts at specific angles in capture/compare mode. To accomplish this, AngTMR uses several counters to perform hardware division and trigger interrupts at the desired moments.
When it is necessary to trigger events at specific angles/phases of a periodic signal, AngTMR is very useful. For example, motor control is a good application of this module. If a DC motor sensor generates a pulse every time the motor completes a rotation, and the user wants to trigger events at 30° and 90° (Event), then AngTMR is the perfect choice. Additionally, it can also be used in the ignition system of internal combustion engines in vehicles, allowing for precise ignition position control based on the engine’s rotation angle, regardless of the engine speed.
The specific principles of AngTMR can be found in the Microchip technical documentation DS90003143A_CN ( TB3143).
Features:
◆ Automatically provides phase/angle conversion for rotating and periodic events. For example, motors, AC alternating signals, TRIAC control, etc.
◆ Converts time base signal values into angle values.
◆ Generates interrupts based on angle variables.
◆ Detects lost events.
◆ Simplifies code development for programs related to angle variables.
◆ Automatically adjusts to changes in frequency.
◆ Simplifies related mathematical operations.
Advantages:
◆ Increases control precision.
◆ Improves system performance.
◆ Reduces code size.
◆ Can operate in Sleep mode.