Digital signals
have
two discrete states
, which are decoded
as
high
and
low
, and interpreted as
logic 1
and
logic 0
.
Analog signals
, on the other hand, are
continuous
, and can
have any value within defined range.
A/D converters
are
specialized circuits which can convert analog signals (voltages)
into a digital representation, usually in form of an
integer
number
. The value of this number is
linearly dependent
on
the input voltage value. Most microcontrollers nowadays internally
have A/D converters connected to one or more input pins. Some of
the most important parameters of A/D converters are
conversion
time
and
resolution
. Conversion time determines how fast can an
analog voltage be represented in form of a digital number. This is an
important parameter if you need fast data acquisition. The other parameter
is resolution. Resolution represents the number of discrete steps that supported
voltage range can be divided into. It determines the sensitivity of the A/D converter.
Resolution is represented in maximum number of bits that resulting number occupies. Most
AVR® microcontrollers have 10-bit resolution, meaning that maximum value of conversion can be
represented with 10 bits, which converted to integer is 2
10
=1024. This means that supported voltage range, for
example from 0-5V, can be divided into 1024 discrete steps of about 4.88mV.
EasyAVR
™
v7 provides an interface in form of two potentiometers for simulating analog input voltages that can be routed to
any of the 12 supported analog input pins.
ADC inputs
P3
10K
R29
220
P1
10K
R17
220
J3
J4
VCC-BRD
VCC-BRD
PD6
PB2
PB0
PB4
PB5
PC3
PD7
PB3
PB1
PC4
PA5
PA6
DATA BUS
C4
100nF
C10
100nF
Enabling ADC inputs
In order to connect the output of the
potentiometer
P1
to
PB0
,
PB2
,
PD6
,
PB4
,
PB5
or
PC3
analog microcontroller
inputs, you have to place the jumper
J3
in the desired position. If you want to
connect potentiometer
P3
to any of the
PB1
,
PB3
,
PD7
,
PC4
,
PA5
or
PA6
analog
microcontroller inputs, place jumper
J4
in the desired position. By moving the
potentiometer knob, you can create
voltages in range from
GND
to
VCC-BRD
.
Figure 16-1: use J3 and J4 jumpers to
connect analog input lines
page 26
Figure 16-2:
Schematic of ADC
input
modules
Easy
AVR
v7