Datasheet

Table Of Contents
46.5.7 Debug Operation
When the CPU is halted in debug mode, the AC will halt normal operation after any on-going comparison
is completed. The AC can be forced to continue normal operation during debugging. Refer to DBGCTRL
for details. If the AC is configured in a way that requires it to be periodically serviced by the CPU through
interrupts or similar, improper operation or data loss may result during debugging.
46.5.8 Register Access Protection
All registers with write access can be write-protected optionally by the Peripheral Access Controller
(PAC), except for the following registers:
Control B register (CTRLB)
Interrupt Flag register (INTFLAG)
Optional write protection by the Peripheral Access Controller (PAC) is denoted by the "PAC Write
Protection" property in each individual register description.
PAC write protection does not apply to accesses through an external debugger.
Related Links
27. PAC - Peripheral Access Controller
46.5.9 Analog Connections
Each comparator has up to four I/O pins that can be used as analog inputs. Each pair of comparators
shares the same four pins. These pins must be configured for analog operation before using them as
comparator inputs.
Any internal reference source, such as a bandgap voltage reference, or DAC must be configured and
enabled prior to its use as a comparator input.
46.5.10 Calibration
The BIAS calibration value from the production test must be loaded from the NVM Software Calibration
Area into the AC Calibration register (CALIB) by software to achieve specified accuracy.
46.6 Functional Description
46.6.1 Principle of Operation
Each comparator has one positive input and one negative input. Each positive input may be chosen from
a selection of analog input pins. Each negative input may be chosen from a selection of both analog input
pins and internal inputs, such as a bandgap voltage reference.
The digital output from the comparator is '1' when the difference between the positive and the negative
input voltage is positive, and '0' otherwise.
The individual comparators can be used independently (Normal mode) or paired to form a window
comparison (Window mode).
46.6.2 Basic Operation
46.6.2.1 Initialization
Some registers are enable-protected, meaning they can only be written when the module is disabled.
The following register is enable-protected:
SAM D5x/E5x Family Data Sheet
AC – Analog Comparators
© 2019 Microchip Technology Inc.
Datasheet
DS60001507E-page 1643