15
EasyPIC6 Development System
MikroElektronika
page
Figure 10-1
: DS1820
connector (1-wire com-
munication is not used)
Figure 10-2
: J11 in the
left-hand position (1-wire
communication through
the RA5 pin)
Figure 10-3
: J11 in the
right-hand position (1-wire
communication through
the RE2 pin)
Figure 10-4
: DS1820
plugged into appropriate
socket
NOTE
:
Make sure that half-
circle on the board matches
the round side of the
DS1820
10.0. DS1820 Temperature Sensor
1-wire
® serial communication enables data to be transferred over one single communication line while the process itself is under the
control of the master microcontroller. The advantage of such communication is that only one microcontroller pin is used. All
VODYH
devices
have by default a unique ID code, which enables the master device to easily identify all devices sharing the same interface.
DS1820 is a temperature sensor that uses 1-wire® standard for its operation. It is capable of measuring temperatures within the range of
-55 to 125°C and provides ±0.5°C accuracy for temperatures within the range of -10 to 85°C. Power supply voltage of 3V to 5.5V is required
for its operation. It takes maximum 750ms for the DS1820 to calculate temperature with 9-bit resolution. The EasyPIC6 development
system provides a separate socket for the DS1820. It may use either RA5 or RE2 pin for communication with the microcontroller. Jumper
J11’s purpose is selection of the pin to be used for 1-wire® communication. Figure 10-5 shows 1-wire® communication with microcontroller
through the RA5 pin.
Figure 10-5
: 1-wire communication schematic
Jumper J11
in the upper position
VCC-MCU
VCC-MCU
DS1820
DQ
J11
VCC-MCU
X1
8MHz
C6
22pF
C7
22pF
R1
1K
PICxxxx
OSC2
RC0
RC1
RC2
RC3
RD0
RD1
OSC1
GND
GND
RD7
RD6
RD5
RD4
RC7
RC6
RC5
RC4
RD3
RD2
VCC
MCLR
RA0
RA1
RA2
RA3
RA4
RA5
RE0
RE1
RE2
VCC
RB0
RB1
RB2
RB3
RB4
RB5
RB6
RB7
DIP40
Botoom view
VCC-MCU
DQ
GND
VCC-MCU
DQ
GND