M I K R O E L E K T R O N I K A S O F T W A R E A N D H A R D W A R E S O L U T I O N S F O R T H E E M B E D D E D W O R L D
2
27
7
page
EasyAVR
USB
4
EasyAVR4 User
’
s Manual
MikroElektronika
Development
tools
44
..00
99
66
VV
VV
OO
LL
TT
AA
GG
EE
RR
EE
FF
EE
RR
EE
NN
CC
EE
4.096V VOLTAGE REFERENCE
Figure 35.
4.096V voltage reference
Some of the Atmel’s microcontrollers have integrated A/D Converter (Analog-to-Digital
Converter). In order for A/D Converter to work, voltage reference must be used. It repre-
sents a maximum value that can be measured by microcontroller. EasyAVR4 uses 4.096V
voltage reference because number 4096 is a power of 2 which makes it easy to represent val-
ues as binary numbers in microcontroller. In case of the 10-bit A/D Converter the resolution
will be 4mV per bit. In case of the 12-bit A/D Converter the resolution will be 1mV per bit.
Analog input pins are placed on PORTA of microcontroller. In order to measure analog sig-
nal without interference, turn the coresponding switch on SW1 to OFF position. This will
disable connection of the used PORTA pin to the pull-up/down resistors.
Applications of A/D Conversion are various. Microcontroller takes analog signal from its
input pin and translates it into a digital value. Basically, you can measure any analog signal
that fits in range acceptable by MCU. With 4.096V voltage reference used (jumper J9 in
lower position) this range is 0V-4.096V. If you place jumper J9 in upper position 5V will be
used as voltage reference and therefor measure range will be 0V-5V.
VREF
4.096V
ON-BOARD
VREF
4.096V
ON-BOARD