Instruction Set
900
SPNU503C – March 2018
Copyright © 2018, Texas Instruments Incorporated
High-End Timer (N2HET) Module
The purpose of the comparison is to assert pin action when the angle compare value lies between the old
counter value and the new counter value (held in the selected register). Since the angle increment varies
from one loop resolution clock to another, an exact equality test cannot be applied. Instead, the following
inequality is used to determine the occurrence of a match:
Old counter value
<
Angle compare value
≤
New counter value
This is done by performing following comparisons:
Selected register value minus angle increment < angle compare value
Angle compare value
≤
Selected register value
register
Register B is recommended for typical applications with ACMP.
irq
Specifies whether or not an interrupt is generated. Specifying ON
generates an interrupt when the edge state is satisfied and the gap
flag is set. Specifying OFF prevents an interrupt from being
generated.
Default: OFF.
data
Specifies the 25-bit angle compare value.
Execution
X = 0;
If (Data <= Selected Register)
Cout = 0;
else
Cout = 1;
If (Z == 0 AND (Selected Register - Angle Inc. < Data ) AND Cout == 0) OR
(Z == 1 AND (Cout_prv == 1 OR Cout == 0)))
{
X = 1;
If (Enable Pin Action == 1)
Selected Pin = Pin Action AT next loop resolution clock;
If (Interrupt Enable == 1)
HETFLG[n] = 1;
/* n depends on address */
If ([C28:C27] == 01)
Generate request on request line [P25:P23];
If ([C28:C27] == 11)
Generate quiet request on request line [P25:P23];
Jump to Conditional Address;
}
else
Jump to Next Program Address;
Cout_prv = Cout (
always executed
)
NOTE:
Carry-Out Signal (Cout)
Cout is the carry-out signal of the adder. Even if it is not a flag, it is valid all along ACMP
instruction execution.
Angle inc. = NAF_global or hardware angle generator 11-bit input.
The specific interrupt flag that is triggered depends on the address from which the instruction is executed,
see