16
Development System EasydsPIC6
MikroElektronika
page
10.0. A/D Converter Test Inputs
An A/D converter is used for converting an analog voltage into the appropriate digital value. The A/D converter is linear, which means
that converted number is linearly dependent on the input voltage value. The A/D converter built into the microcontroller converts
an analog voltage value into a digital number. Potentiometer P1 enables voltage to vary between 0 and 5V. The microcontroller
with a built-in A/D converter is supplied with this voltage via test inputs. Jumpers J12 are used for selecting one of the following
microcontroller pins (RB4 - RB7) to be supplied with A/D conversion voltage. Resistor R6 has a protective function and is used to limit
current flow through the potentiometer, that is to say the microcontroller pin.
Figure 10-1
: ADC (jumper’s default position)
Figure 10-2
: Pin RB4 as input pin for A/D conversion
Figure 10-3
: Microcontroller and A/D converter test inputs connection schematic
NOTE:
In order to enable the microcontroller to accurately perform A/D conversion, it is necessary to turn off LEDs and pull-up/
pull-down resistors on the port pins used by the A/D converter.
A/D conversion is performed via the RB4 microcontroller pin