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
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
158 of 313
NXP Semiconductors
UM10601
Chapter 13: LPC800 Analog comparator
13.5.4 Comparator outputs
The comparator output (conditioned by COMPSA bit) can be routed to an external pin.
When COMPSA is 0 and the comparator interrupt is disabled, the comparator can be
used with the bus clock disabled (
Table 18 “System clock control register
(SYSAHBCLKCTRL, address 0x4004 8080) bit description”
) to save power if the control
registers don’t need to be written.
The status of the comparator output can be observed through the comparator status
register bit.
The comparator output can be routed to the SCT via the switch matrix allowing to capture
the time of a voltage crossing or to count crossings in either or both directions. See
Section 13.3.1 “Connect the comparator output to the SCT”
.
13.6 Register description
13.6.1 Comparator control register
This register enables the comparator, configures the interrupts, and controls the input
multiplexers on both sides of the comparator. All bits not shown in
are reserved
and should be written as 0.
Table 150. Register overview: Analog comparator (base address 0x4002 4000)
Name
Access Address
offset
Description
Reset value
CTRL
R/W
0x000
Comparator control register
0
LAD
R/W
0x004
Voltage ladder register
0
Table 151. Comparator control register (CTRL, address 0x4002 4000) bit description
Bit
Symbol
Value
Description
Reset
value
2:0
-
Reserved. Write as 0.
0
4:3
EDGESEL
This field controls which edges on the comparator
output set the COMPEDGE bit (bit 23 below):
0
0x0
Falling edges
0x1
Rising edges
0x2
Both edges
0x3
Both edges
5
-
Reserved. Write as 0.
0
6
COMPSA
Comparator output control
0
0
Comparator output is used directly.
1
Comparator output is synchronized to the bus clock for
output to other modules.
7
-
Reserved. Write as 0.
0