|
AAN124
Interface the Athena to
a DS1620 Thermometer
By Michael
Simpson
The DS1620 is a very
accurate thermometer. It is accurate to .5 Celsius.
Features
-
Requires no external
components
-
Supply voltage range
covers 2.7v to 5.5v
-
Measures temperatures
from -55°C to +125°C in .5°C increments and -67°F to +257°F in .9°F
increments
-
Converts temperature to
to digital in 1 second (max)
-
3 Wire Interface
Since the Athena has only
8 bit variables we will stick to 0 - 125 degrees in 1 degree increments.
Hookup

This program takes does
two shiftout commands. The first setsup the DS1620 and the second
tells the DS1620 we want to read the temperature. The program then
reads the temperature. We will through away the .5 bit by dividing the
result by 2
Program 1
download it here
'DS1620 Demo
dim temp
const dat 0
const clk 1
const rst 2
output clk
output rst
low rst
high clk
loop:
gosub gettemp
print temp
pause 100
goto loop
gettemp:
high rst
pauseus 50
output dat
shiftout dat,clk,8,238
low rst
high rst
pauseus 50
output dat
shiftout dat,clk,8,170
input dat
shiftin dat,clk,8,temp
low rst
temp = temp/2
return
Parts
Easy RS232 Driver
Athena
DS1620
7.5V AC Adapter
9 Pin Cable
Breadboard and
Wire Kit
Breadboard
Regulator
|