Instruction Set
1121
SPNU563A – March 2018
Copyright © 2018, Texas Instruments Incorporated
High-End Timer (N2HET) Module
When the compared values match in angle mode, a pin can be set or reset
according to the pin action bit (C4). The pin does not change states if the
enable pin action bit (C22) is reset.
The restart enable bit (C1) provides the option to unconditionally restart a
sequence using the X-flag bit of ACMP.
restart
If restart is set to ON and the X flag = 1, the assembler writes a value
of 1 into the immediate index field, writes the value in register A into
the immediate data field, and jumps to the next program address. The
X flag is set or cleared by the ACMP instruction. If restart is set to
OFF, the X flag is ignored; no special action is performed.
Default: OFF.
irq
ON generates an interrupt if the compare match occurs in angle
mode. No interrupt is generated when the field is OFF.
Default: OFF.
data
Specifies the 25-bit compare value.
cond_addr
Since the LSB of the conditional address is used to select between
time mode and angle mode, and since the conditional address is
taken only in time mode, the destination for the conditional address
must be odd.
Execution
If (Data field value <= Selected register value) Cout = 0; else Cout = 1;
If (Restart Enable == 1 AND X == 1)
{
C13 = 1;
Immediate Data Field = Register A;
Cout = 0;
Jump to Next Program Address;
}
If (
Angle Mode
(C13 == 0) AND ((Restart En. == 1 AND X == 0) OR Restart En. == 0))
{
If (Z == 0 AND (Register B value - Angle Inc. < Data field value) AND Cout == 0) OR
(Z == 1 AND (Cout_prv == 1 OR Cout == 0)))
{
If (Enable Pin Action == 1) Selected Pin = Pin Action;
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];
Immediate Data Field = Register A;
C13 = 1; /*** switch to
Time Mode
***/
}
Jump to Next Program Address;
}
Else If (
Time Mode
(C13 == 1)) AND ((Restart En. == 1 AND X == 0) OR Restart En. == 0)
{
/* Result of subtract must not exceed 2^24 - 1 */
Register T = Register A - Immediate Data Field;
Jump to Conditional Program Address;
}
Cout_prv = Cout; (always executed)
The specific interrupt flag that is triggered depends on the address from which the instruction is executed,
see