17.4.10 Comparator

Each list has a result comparator. The result of the comparison must be stored in Accumulator A. The comparison criteria are selected by the 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 data in Accumulator A is compared with thresholds defined in the 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 a selected criterion in the CM[2:0] bits, a sticky flag in the ITCHIT register is set. The hardware sets the 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 the 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 the MODE[2:0] bits of the ITCLSxCON register.