Datasheet

EasyPIC
for dsPIC30
®
v7
page 30
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 dened
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 PIC® microcontrollers have 12-bit
resolution, meaning that maximum value of conversion can be represented with 12 bits, which converted to
integer is 2
12
=4096. This means that supported voltage range, for example from 0-5V, can be divided into 4096
discrete steps of about 1.22mV. We gave you the possibility to set microcontroller voltage reference to 4.096V
DC by putting jumper J10 (RBO/VREF+) to 4.096V position, Figure 17-2. This can be done only when the
power supply is 5V (jumper J16 in 5V position). In that case discrete steps are 1mV. When using voltage
reference module, make sure to disconnect other peripherals from RB0 pin. EasyPIC
v7 for dsPIC30® provides
an interface in form of potentiometer for simulating analog input voltages that can be routed to any of the 7
supported analog input pins.
ADC inputs
P3
10K
R12
220
VCC-BRD
C6
100nF
J7
RB0
RB1
RB2
RB3
RB10
RB11
RB12
DATA BUS
Enabling ADC inputs
In order to connect the output of the
potentiometer P3 to RB0, RB1, RB2, RB3,
RB10, RB11 or RB12 analog microcontroller
inputs, you have to place the jumper J7 in the
desired position. By moving the potentiometer
knob, you can create voltages in range from
GND to VCC-BRD.
Figure 17-1:
Potentiometer output
connected to RB1
microcontroller pin
other modules
Figure 17-2: use jumper J10 to set microcontroller
voltage reference to 4.096V or VCC position
In order to set microcontroller voltage reference, you
must place jumper J10 (RBO/VREF+) to appropriate
position. Use 4.096 position ONLY when the jumper
J16 is in 5V position.