microchip_adc.pdf
(
89 KB
)
Pobierz
Analog-to-Digital
Converters
Getting Started - Analog-to-Digital Converters
© 3.1.2001
In this presentation we will look at the Analog-to-Digital Converter Peripherals with
Microchip’s midrange PICmicro
®
Microcontrollers series.
1
Analog-
to
to-
Digital Converters
Digital Converters
Analog
Analog-to-Digital Converters
l
Topics Covered:
l
Topics Covered:
Terminology
Terminology
l
l
Configuration
Configuration
l
l
Usage
Usage
l
l
Differences between 8- and 10- or 12-bit A/D
Differences between 8- and 10- or 12-bit A/D
l
l
Additional Resources
Additional Resources
l
l
Getting Started - Analog-to-Digital Converters
© 3.1.2001
Basic analog-to-digital converter terminology will be covered first, followed by
configuration of the analog-to-digital converter peripheral. Next, information on the
usage of the peripheral will be presented, initially focusing on the 8-bit analog-to-
digital converter. Then the differences between the 8-bit and the 10-or 12-bit
converters will be discussed. Finally, some additional reference resources will be
highlighted.
2
Analog-
to
to-
Digital Converter
Digital Converter
Analog
Analog-to-Digital Converter
l
Converts an analog voltage level to a digital
number
l
Converts an analog voltage level to a digital
number
Digital Numbers can be effectively handled by
microcontrollers, analog levels cannot
Digital Numbers can be effectively handled by
microcontrollers, analog levels cannot
l
l
Digital numbers are non-fractional
Digital numbers are non-fractional
l
l
A/D
Converter
2.343 volts
87
Getting Started - Analog-to-Digital Converters
© 3.1.2001
Microcontrollers are very efficient at processing digital numbers, but they cannot
handle analog signals directly. An analog-to-digital converter, converts an analog
voltage level to a digital number. The microcontroller can then efficiently process
the digital representation of the original analog voltage. By definition, digital
numbers are non-fractional whole numbers.
In this example, an input voltage of 2.343 volts is converted to 87. The user’s
software can use the value 87 as the representation of the original input voltage. At
this point, the number 87 is only used for discussion purposes as a typical output.
3
Input Range
l
The analog input voltage must be within the
valid input range of the A/D for an accurate
conversion
l
Input range set by reference voltages
l
The analog input voltage must be within the
valid input range of the A/D for an accurate
conversion
l
Input range set by reference voltages
Power and Ground
Power and Ground
l
l
External References
External References
l
l
Internal References
Internal References
l
l
Getting Started - Analog-to-Digital Converters
© 3.1.2001
The analog-to-digital converter is only capable of performing an accurate
conversion if the analog input voltage is within the valid input range of the
converter. If the input voltage falls outside this range, the conversion value will be
inaccurate. The input range is set by high and low voltage references. These define
the upper and lower limits of the valid input range. In many cases, the high and low
voltage references are selected as the microcontroller supply voltage and ground, at
other times an external reference or references are used.
In addition, some devices have internal voltage references that can be used. The
source or sources for these voltage references are a configuration option when
setting up the analog-to-digital converter in the PICmicro microcontroller (MCU).
Note that there are restrictions on the voltage reference levels, for example: the
reference voltages generally shouldn’t be less than Vss or greater than V
DD
. There
is also a minimum difference that is required between the high and low reference
voltages. Please consult your data sheet for the voltage reference requirements.
4
Quantization
l
Refers to subdividing a space into small but
measurable increments.
l
The maximum quantization error is 1/2 the
increment size
Quantization
Limits
Result
2.5V
2.4V
2.3V
2.2V
Input Voltage
88
87
86
2.343V
Getting Started - Analog-to-Digital Converters
© 3.1.2001
The output of an analog-to-digital converter is a quantized representation of the
original analog signal. The term quantization refers to subdividing a range into
small but measurable increments. The total allowable input range is divided into a
finite number of regions with a fixed increment. The analog-to-digital converter
determines the appropriate region to assign the given input voltage.
In this example, the step or increment is one-tenth of a volt and the input voltage is
2.343 volts. The appropriate result would be assigned as a digital value of 87,
because 2.343 volts fits between the quantization limits of 2.3 volts and 2.4 volts.
Any input voltage between the 2.3 and 2.4 volt quantization limits will be assigned
a digital value of 87.
The process of quantization has the potential to introduce an inaccuracy known as
quantization error, which can be viewed as being similar to a rounding error. In the
above example, the 2.343 volt input is in effect rounded to the nearest tenth of a
volt. The maximum quantization error in this case would be five hundredths of a
volt or one-half of the increment size. It should be noted that the minimum
quantization error for the analog-to-digital converter peripheral in the PICmicro
devices is 500 micro volts. Therefore, the smallest step size for each state cannot be
less than one milli-volt.
5
Plik z chomika:
kojczuch
Inne pliki z tego folderu:
m3807.pdf
(1182 KB)
m206.pdf
(142 KB)
m27c1001.pdf
(134 KB)
m3005l.pdf
(101 KB)
m3004l.pdf
(87 KB)
Inne foldery tego chomika:
a
ad
all
at
ba
Zgłoś jeśli
naruszono regulamin