P(n-1)
SCNT
N0 +K
N0 +2K
N0 +3K
N0 +4K
N0
N1 +K
N1 +2K
N1 +3K
N1 +4K
N1=N0+nK-P(n-1)
Final Count = N0+nK
Final Count = N1+mK
N2=N1+mK-P(n-1)
ACNT
SCNT
PCNT
Input pin
K counts
P n
1
–
(
)
K
---------------------
P n
1
–
(
)
K
---------------------
P(n-1)
P(n)
Angle counter
Step counter
Period counter
Angle Functions
833
SPNU503C – March 2018
Copyright © 2018, Texas Instruments Incorporated
High-End Timer (N2HET) Module
Figure 20-39. Angle Generation Using Time Based Algorithm
Because of stepping, the final count of the SCNT will usually be unequal to the target value PCNT(n-1)
and then will overflow. To compensate for this error generated by the algorithm, reset the SCNT to the
remainder of the difference between (SCNT - PCNT(n-1)).
To see how the SCNT and PCNT(n-1) generate angle ticks and compensate for the error due to the
integer fractions, see
Figure 20-40. SCNT Stepping Compensation