331
XMEGA B [DATASHEET]
8291B–AVR–01/2013
Figure 26-10.Signed single-ended and internal input, input range, and result representation.
Figure 26-11.Unsigned single-ended and internal input, input range, and result representation.
26.7
Compare Function
The ADC has a built-in 12-bit compare function. The ADC compare register can hold a 12-bit value that represents a
threshold voltage. The ADC channel can be configured to automatically compare its result with this compare value to
give an interrupt or event only when the result is above or below the threshold.
26.8
Starting a Conversion
Before a conversion is started, the input source must be selected. An ADC conversion can be started either by the
application software writing to the start conversion bit or from any events in the event system.
26.8.1 Input Source Scan
It is possible to select a range of consecutive input sources that is automatically scanned and measured when a
conversion is started. This is done by setting the first (lowest) positive ADC channel input using the MUX control register,
and a number of consecutive positive input sources. When a conversion is started, the first selected input source is
measured and converted, then the positive input source selection is incremented after each conversion until it reaches
the specified number of sources to scan.
26.9
ADC Clock and Conversion Timing
The ADC is clocked from the peripheral clock. The ADC can prescale the peripheral clock to provide an ADC Clock
(clk
ADC
) that matches the application requirements and is within the operating range of the ADC.
2047
2046
2045
...
3
2
1
0
-1
-2
...
-2045
-2046
-2047
-2048
7FF
7FE
7FD
...
3
2
1
0
FFF
FFE
...
803
802
801
800
Dec
Hex
0111 1111 1111
0111 1111 1110
0111 1111 1101
...
0000 0000 0011
0000 0000 0010
0000 0000 0001
0000 0000 0000
1111 1111 1111
1111 1111 1110
...
1000 0000 0011
1000 0000 0010
1000 0000 0001
1000 0000 0000
Binary
0000 0111 1111 1111
0000 0111 1111 1110
0000 0111 1111 1101
...
0000 0000 0000 0011
0000 0000 0000 0010
0000 0000 0000 0001
0000 0000 0000 0000
1111 1111 1111 1111
1111 1111 1111 1110
...
1111 1000 0000 0011
1111 1000 0000 0010
1111 1000 0000 0001
1111 1000 0000 0000
16-bit result register
VREF
-VREF
0 V
VINP
VINN = GND
4095
4094
4093
...
203
202
201
200
FFF
FFE
FFD
...
0CB
0CA
0C9
0C8
Dec
Hex
1111 1111 1111
1111 1111 1110
1111 1111 1101
...
0000 1100 1011
0000 1100 1010
0000 1100 1001
0000 1100 1000
Binary
0000 1111 1111 1111
0000 1111 1111 1110
0000 1111 1111 1101
...
0000 0000 1100 1011
0000 0000 1100 1010
0000 0000 1100 1001
0000 0000 1100 1000
16-bit result register
V
VREF
VINN
Δ
−
=
2
GND
V
VREF
Δ
−
VINP
...
0
0
0000 0000 0000
0000 0000 0000 0000
Summary of Contents for XMEGA B
Page 320: ...320 XMEGA B DATASHEET 8291B AVR 01 2013 Table 25 12 7 segments Character Table...
Page 321: ...321 XMEGA B DATASHEET 8291B AVR 01 2013 Table 25 13 14 segments Character Table...
Page 322: ...322 XMEGA B DATASHEET 8291B AVR 01 2013 Table 25 14 16 segments Character Table...
Page 412: ...412 XMEGA B DATASHEET 8291B AVR 01 2013...
Page 413: ...413 XMEGA B DATASHEET 8291B AVR 01 2013...