
UM10800
All information provided in this document is subject to legal disclaimers.
© NXP Semiconductors N.V. 2016. All rights reserved.
User manual
Rev. 1.2 — 5 October 2016
353 of 487
22.1 How to read this chapter
The analog comparator is available on all LPC82x parts.
Remark:
The external voltage ladder reference VDDCMP is not available on the
TSSOP20 package.
22.2 Features
•
Selectable external inputs can be used as either the positive or negative input of the
comparator.
•
The Internal voltage reference (0.9 V bandgap reference) can be used as either the
positive or negative input of the comparator.
•
32-stage voltage ladder can be used as either the positive or negative input of the
comparator.
•
Voltage ladder source selectable between the supply pin V
DD
or VDDCMP pin.
•
Voltage ladder can be separately powered down when not required.
•
Interrupt capability
22.3 Basic configuration
Configure the analog comparator using the following registers:
•
In the SYSAHBCLKCTRL register, set bit 19 (
) to enable the clock to the
register interface.
•
You can enable or disable the power to the analog comparator through the
PDRUNCFG register (
•
Clear the analog comparator peripheral reset using the PRESETCTRL register
(
).
•
The analog comparator interrupt is connected to interrupt #11 in the NVIC.
•
Configure the analog comparator pin functions through the switch matrix. See
.
22.3.1 Connect the comparator output to the SCT
The comparator output function (ACMP_O) can be used to start or stop the
SCTimer/PWM or, more generally, to create an SCT event without assigning a pin through
the switch matrix. To create an SCT event internally connected to the comparator output,
select the comparator output as one of the SCT inputs through the INPUT MUX (see
UM10800
Chapter 22: LPC82x Analog comparator
Rev. 1.2 — 5 October 2016
User manual