
DR
AFT
DR
AFT
DRAFT
DR
D
RAFT
DRAFT
DRA
FT DRAF
D
RAFT DRAFT DRAFT DRAFT DRAFT D
DRAFT
D
RAFT DRA
FT DRAFT DRAFT DRAFT DRA
UM10360_0
© NXP B.V. 2009. All rights reserved.
User manual
Rev. 00.06 — 5 June 2009
554 of 808
NXP Semiconductors
UM10360
Chapter 29: LPC17xx Analog-to-Digital Converter (ADC)
5.4 A/D Data Registers (AD0DR0 to AD0DR7 - 0x4003 4010 to
0x4003 402C)
The A/D Data Registers hold the result of the last conversion for each A/D channel, when
an A/D conversion is complete. They also include the flags that indicate when a
conversion has been completed and when a conversion overrun has occurred.
Results of ADC conversion can be read in one of two ways. One is to use the A/D Global
Data Register to read all data from the ADC. Another is to use the
A/D Channel Data
Registers
. It is important to use one method consistently because the DONE and
OVERRUN flags can otherwise get out of synch between the AD0GDR and the
A/D
Channel Data Register
s, potentially causing erroneous interrupts or DMA activity.
5.5 A/D Status register (ADSTAT - 0x4003 4030)
The A/D Status register allows checking the status of all A/D channels simultaneously.
The DONE and OVERRUN flags appearing in the ADDRn register for each A/D channel
are mirrored in ADSTAT. The interrupt flag (the logical OR of all DONE flags) is also found
in ADSTAT.
Table 516: A/D Data Registers (AD0DR0 to AD0DR7 - 0x4003 4010 to 0x4003 402C) bit description
Bit
Symbol
Description
Reset
value
3:0
-
Reserved, user software should not write ones to reserved bits. The value read from a
reserved bit is not defined.
NA
15:4
RESULT
When DONE is 1, this field contains a binary fraction representing the voltage on the ADn pin,
divided by the voltage on the V
REF
pin (V/V
REF
). Zero in the field indicates that the voltage on
the AIN pin was less than, equal to, or close to that on V
SSA
, while 0x3FF indicates that the
voltage on AIN was close to, equal to, or greater than that on V
REF
.
NA
29:16
-
Reserved, user software should not write ones to reserved bits. The value read from a
reserved bit is not defined.
NA
30
OVERRUN This bit is 1 in burst mode if the results of one or more conversions was (were) lost and
overwritten before the conversion that produced the result in the RESULT bits.This bit is
cleared by reading this register.
31
DONE
This bit is set to 1 when an A/D conversion completes. It is cleared when this register is read. NA
Table 517: A/D Status register (AD0STAT - address 0x4003 4030) bit description
Bit
Symbol
Description
Reset
value
0
DONE0
This bit mirrors the DONE status flag from the result register for A/D channel 0.
0
1
DONE1
This bit mirrors the DONE status flag from the result register for A/D channel 1.
0
2
DONE2
This bit mirrors the DONE status flag from the result register for A/D channel 2.
0
3
DONE3
This bit mirrors the DONE status flag from the result register for A/D channel 3.
0
4
DONE4
This bit mirrors the DONE status flag from the result register for A/D channel 4.
0
5
DONE5
This bit mirrors the DONE status flag from the result register for A/D channel 5.
0
6
DONE6
This bit mirrors the DONE status flag from the result register for A/D channel 6.
0
7
DONE7
This bit mirrors the DONE status flag from the result register for A/D channel 7.
0
8
OVERRUN0
This bit mirrors the OVERRRUN status flag from the result register for A/D channel 0.
0
9
OVERRUN1
This bit mirrors the OVERRRUN status flag from the result register for A/D channel 1.
0
10
OVERRUN2
This bit mirrors the OVERRRUN status flag from the result register for A/D channel 2.
0