Instructions

229 C-Control Pro IDE
© 2013 Conrad Electronic
5.4 Analog-Digital-Converter
5.4.1 Mega
The Micro Controller has an Analog Digital Converter with a resolution of 10 Bit. I. e. measured
voltages can be displayed as integral numbers from 0 through 1023. Reference voltage for the lower
limit is GND level (0V). The reference voltage for the upper limit can be selected at will.
External Reference Voltage
AVCC with capacitor on AREF
Internal Reference Voltage 2.56V with capacitor on AREF
Analog Inputs ADC0 ... ADC7, ADC_BG, ADC_GND
For the ADC the Inputs ADC0 ... ADC7 (Port A.0 to A.7 with Mega32, Port F.0 to F.7 with
Mega128), an internal Band Gap (1.22V) or GND (0V) are available. ADC_BG and ADC_GND can
be used for review of the ADC.
If x is a digital measuring value then the corresponding voltage value u is calculated as follows:
u = x * Reference V oltage / 1024
If the external reference voltage e. g. produced by a reference voltage IC is 4.096V, then the differ-
ence of one bit of the digitized measuring value corresponds to a voltage difference of 4mV, or:
u = x * 0,004V
The result of an A/D conversion can be influenced, if any Port Bit (configured for output) on the same
Port as the A/D channel, is changed during the measurement.
Differential Inputs
ADC22x10 Differential Inputs ADC2, ADC2, Gain 10 ; Offset Measurement
ADC23x10 Differential Inputs ADC2, ADC3, Gain 10
ADC22x200 Differential Inputs ADC2, ADC2, Gain 200 ; Offset Measurement
ADC23x200 Differential Inputs ADC2, ADC3, Gain 200
ADC20x1 Differential Inputs ADC2, ADC0, Gain 1
ADC21x1 Differential Inputs ADC2, ADC1, Gain 1
ADC22x1 Differential Inputs ADC2, ADC2, Gain 1 ; Offset Measurement
ADC23x1 Differential Inputs ADC2, ADC3, Gain 1
ADC24x1 Differential Inputs ADC2, ADC4, Gain 1
ADC25x1 Differential Inputs ADC2, ADC5, Gain 1
ADC2 is the negative input.
The ADC can also perform differential measurements. The result can either be positive or negative.
The resolution during differential operation amounts to +/- 9 bit and is displayed in Two's Comple-
ment format. For differential operation an amplifier with gains of V: x1, x10, x200 is available. If x is a
digital measuring value then the corresponding voltage value u is calculated as follows: