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
lineary dependent
on the
input voltage value. Most microcontrollers nowdays 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 PIC®
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 devided into 1024 discrete steps of about 4.88mV.
EasyPIC
™
v7 provides an interface in form of two potentiometers for simulating analog input voltages that can be routed to
any of the 10 supported analog input pins.
ADC inputs
DATA BUS
VCC-MCU
P1
10K
J15
RA0
RA1
RA2
RA3
RA5
M2X5
R63
220
VCC-MCU
P2
10K
J16
RB0
RB1
RB2
RB3
RB4
M2X5
R64
220
ADC INPUT
Enabling ADC inputs
In order to connect the output of the
potentiometer
P1
to
RA0
,
RA1
,
RA2
,
RA3
or
RA5
analog microcontroller inputs,
you have to place the jumper
J15
in the
desired position. If you want to connect
potentiometer
P2
to any of the
RB0 – RB4
analog microcontroller inputs, place jumper
J16
in the desired position. By moving
the potentiometer knob, you can create
voltages in range from
GND
to
VCC
.
Figure 17-1: use J15 and J16 jumpers
to connect analog input lines with
potentiometers P1 and P2
page 30
Figure 17-2:
Schematic of ADC
input
modules