Operation, Atmega16(l) – Rainbow Electronics ATmega64L User Manual

Page 196

Advertising
background image

196

ATmega16(L)

2466B–09/01

Figure 98. Analog to Digital Converter Block Schematic

Operation

The ADC converts an analog input voltage to a 10-bit digital value through successive
approximation. The minimum value represents GND and the maximum value represents
the voltage on the AREF pin minus 1 LSB. Optionally, AVCC or an internal 2.56V refer-
ence voltage may be connected to the AREF pin by writing to the REFSn bits in the
ADMUX register. The internal voltage reference may thus be decoupled by an external
capacitor at the AREF pin to improve noise immunity.

The analog input channel and differential gain are selected by writing to the MUX bits in
ADMUX. Any of the ADC input pins, as well as GND and a fixed bandgap voltage refer-
ence, can be selected as single ended inputs to the ADC. A selection of ADC input pins
can be selected as positive and negative inputs to the differential gain amplifier.

If differential channels are selected, the differential gain stage amplifies the voltage dif-
ference between the selected input channel pair by the selected gain factor. This

ADC CONVERSION

COMPLETE IRQ

8-BIT DATA BUS

15

0

ADC MULTIPLEXER

SELECT (ADMUX)

ADC CTRL. & STATUS

REGISTER (ADCSRA)

ADC DATA REGISTER

(ADCH/ADCL)

MUX2

ADIE

ADATE

ADSC

ADEN

ADIF

ADIF

MUX1

MUX0

ADPS0

ADPS1

ADPS2

MUX3

CONVERSION LOGIC

10-BIT DAC

+

-

SAMPLE & HOLD
COMPARATOR

INTERNAL 2.56V

REFERENCE

MUX DECODER

MUX4

AVCC

ADC7

ADC6

ADC5

ADC4

ADC3

ADC2

ADC1

ADC0

REFS0

REFS1

ADLAR

+

-

CHANNEL SELECTION

GAIN SELECTION

ADC[9:0]

ADC MULTIPLEXER
OUTPUT

GAIN
AMPLIFIER

AREF

BANDGAP

REFERENCE

PRESCALER

SINGLE ENDED / DIFFERENTIAL SELECTION

GND

POS.

INPUT

MUX

NEG.

INPUT

MUX

TRIGGER

SELECT

ADTS[2:0]

INTERRUPT

FLAGS

ADHSM

START

Advertising