page 34
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. For example if microcontroller has 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-3.3V, can be divided into 1024
discrete steps of about 3.22mV.
mikromedia
™
workStation v7 board provides an interface in form of two potentiometers for simulating analog input
voltages that can be routed to any of the 7 supported analog input pins of mikromedia
™
board.
ADC inputs
P1
10K
R1
220
VCC-3.3V
J2
P2
10K
R8
220
VCC-3.3V
J7
C4
100nF
C1
100nF
G0.0
G0.1
G0.2
G0.3
G0.4
A0
A1
DATA BUS
Enabling ADC inputs
In order to connect the output of the
potentiometer
P1
to
G0.0
,
G0.1
,
G0.2
,
G0.3
or
G0.4
analog mikromedia
™
inputs,
you have to place the jumper
J2
in the
desired position. If you want to connect
potentiometer
P2
to
A0
or
A1
analog
mikromedia
™
inputs, place jumper
J7
in the desired position. By moving the
potentiometer knob, you can create
voltages in range from
GND
to
VCC
.
Figure 14-1: use J2 and J7 jumpers
to connect analog input lines with
potentiometers P1 and P2
Figure 14-2: Schematic of ADC input
other modules