Instruction Set
934
SPNU503C – March 2018
Copyright © 2018, Texas Instruments Incorporated
High-End Timer (N2HET) Module
Description
This instruction compares the magnitude of the 25-bit data value stored in the
data field (D31-D7) and the 25-bit value stored in the selected ALU register
(A, B, R, S, or T).
If the hr_lr bit is reset, pin action will occur after a delay from the next loop
resolution clock. If the hr_lr bit is set, the delay is ignored. This delay is
programmed in the data field (D6-D0).
When the data value matches, an output pin can be set or reset according to
the pin action bit (C[4]). The pin will not change states if the enable pin action
bit (C[22]) is reset.
MCMP uses the zero flag set to generate opposite pin action (synchronized to
the loop resolution clock). The save sub bit (P[5]) provides the option to save
the result of a subtraction into register T.
NOTE:
The Difference Between Compare Values
The difference between the two data values must not exceed (2
24
) - 1.
angle_comp
Determines whether or not an angle compare is performed. A value of
ON causes the comparison to be performed only if the new angle flag
is set (NAF = 1). If OFF is specified, the compare is then performed
regardless of the state of the new angle flag.
Default: OFF.
savesub
When set, the comparison result is saved into the T register (upper
25 bits).
Default: OFF.
order
Specifies the order of the operands for the comparison.
Table 20-86. Magnitude Compare Order for MCMP
Order
C5
Description
REG_GE_DATA
0
Evaluates to true if the register value is greater than or equal to the data field value.
DATA_GE_REG
1
Evaluates to true if the data field value is greater than or equal to the register value.
irq
Specifies whether or not an interrupt is generated. A value of ON
sends an interrupt if the compare match occurs according to the order
selected. If OFF is selected, no interrupt is generated.
data
Specifies the value for the data field. This value is compared with the
selected register.
hr_data
HR delay. The default value for an unspecified bit is 0.