17.3.10 Comparator
Each list has a result comparator. The result for the comparison must be stored in Accumulator A. The comparison criteria is selected by CM[2:0] bits in the ITCLSxCON register. The following comparison options are available:
- CM[2:0] =
4
: Outside Window (Accumulator A < ITCLSxCMPLO and Accumulator A > ITCLSxCMPHI). - CM[2:0] =
3
: Inside Window (Accumulator A > ITCLSxCMPLO and Accumulator A < ITCLSxCMPHI). - CM[2:0] =
2
: Greater Than (Accumulator A > ITCLSxCMPHI). - CM[2:0] =
1
: Match Less Than (Accumulator A < ITCLSxCMPLO). - CM[2:0] =
0
: Comparison is disabled.
The result to be compared should be stored in Accumulator A of the math sequencer. The comparison of the Accumulator A is compared with thresholds defined in ITCLSxCMPLO and ITCLSxCMPHI registers. The comparison is executed when the CMP bit is set in the math sequencer command.
If the Accumulator A value matches the selected bit criteria in the CM[2:0] bits criteria, a sticky flag in the ITCHIT register is set. The hardware sets ITCHIT bits, but they must be cleared by software.
The comparison event may affect storing a result in the ITCRESx register if this is defined by a Write mode bits in the ITCLSxCON register or math sequencer command.
The comparison event may control the ITC interrupt behavior if this is defined in MODE[2:0] bits of the ITCLSxCON register.