1.8.2 Quick Start Guide for AC - Callback

In this use case, the Analog Comparator module is configured for:
  • Comparator peripheral in manually triggered (e.g. "Single Shot" mode)

  • One comparator channel connected to input MUX pin 0 and compared to a scaled VCC/2 voltage

This use case sets up the Analog Comparator to compare an input voltage fed into a GPIO pin of the device against a scaled voltage of the microcontroller's VCC power rail. The comparisons are made on-demand in single-shot mode, and the result stored into a local variable which is then output to the board LED to visually show the comparison state.