DRAFT
DRAFT DRAFT DR
DRAFT DRAFT DRAFT
D
RAF
DRAFT DRAFT DRA
FT D
RAFT DR
AFT D
DRA
FT DRAFT DRAFT
D
RAFT
DRAFT
D
RAFT
DRA
UM10601
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2012. All rights reserved.
Preliminary user manual
Rev. 1.0 — 7 November 2012
155 of 313
13.1 How to read this chapter
The analog comparator is available on all LPC800 parts.
13.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
13.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
.
13.3.1 Connect the comparator output to the SCT
You can use the comparator output function (ACMP_O) to start or stop the SCT or, more
generally, create an SCT event. To create an SCT event, connect AMP_O as follows:
1. Using the switch matrix, connect ACMP_O to a pin. See
2. Using the switch matrix, connect any of the SCT input functions to the same pin. See
The selected SCT input can now monitor the ACMP_O function.
UM10601
Chapter 13: LPC800 Analog comparator
Rev. 1.0 — 7 November 2012
Preliminary user manual