Datasheet

www.ti.com
Instruction Set
angle_count Specifies when the counter is incremented. A value of ON causes the
counter value to be incremented only if the new angle flag is set
(NAF_global = 1). A value of OFF increments the counter each time
the CNT instruction is executed.
Default value for this field is OFF.
comp When set to EQ the counter is reset, when it is equal to the maximum
count.
When set to GE the counter is reset, when it is greater or equal to the
maximum count.
Default: GE.
irq ON generates an interrupt when the counter overflows to zero. The
interrupt is not generated until the data field is reset to zero. If irq is
set to OFF, no interrupt is generated.
Default: OFF.
max Specifies the 25-bit integer value that defines the maximum count
value allowed in the data field. When the count in the data field is
equal to max, the data field is reset to 0 and the Z system flag is set
to 1.
data Specifies the 25-bit integer value serving as a counter.
Default: 0.
Execution
Z = 0;
If (Angle Count (bit P8 == 1))
{
If (NAF_global == 0)
{
Selected register = immediate data field;
Jump to Next Program Address;
}
else
{
If ((Immediate Data Field + Angle Increment) >= Max count)
{
Z = 1;
Selected register = ((Immediate Data Field + Angle Inc.) - Max count);
Immediate Data Field = ((Immediate Data Field + Angle Inc.) - Max count);
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];
}
else
{
Selected register = Immediate Data Field + Angle Increment;
Immediate Data Field = Immediate Data Field + Angle Increment;
}
}
}
else if(Time mode (bit P8 == 0))
{
If [(P5==0) AND (Immediate Data Field == Max count)]
OR [(P5==1) AND (Immediate Data Field >= Max count)]
{
Z = 1;
1021
SPNU562May 2014 High-End Timer (N2HET) Module
Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated