Kronos Robotics and Electronics
Site Map
 
Home Zeus Projects App Notes Downloads Dios Athena Forums
 

DAN124

Interface the Dios to a DS1620 Thermometer

  By Michael Simpson

The DS1620 is a very accurate thermometer.   It is accurate to .5 Celsius.   The routines below will convert from Celsius to Fahrenheit.

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

I'm not going to get into the theory behind the DS1620 or the 3 wire protocol.  If you want that its available in the Data sheet.  I have provided library to shield you from the details. 

Functions

DS1620init(IO,CLK,RST)

This must be called before any of the other routines are called. It sets up the DS1620 for reading.

IO The Dios port connected to the DQ line of the DS1620

CLK The Dios port connected to the CLK line of the DS1620

RST The Dios port connected to the RST line of the DS1620

 

ds1620readtemp(IO,CLK,RST)

Reads the the temperature of the DS1620. Returns a FLOAT value.

IO The Dios port connected to the DQ line of the DS1620

CLK The Dios port connected to the CLK line of the DS1620

RST The Dios port connected to the RST line of the DS1620

 

CelsiustoF(celcius)

Returns the converted Celsius data as Fahrenheit. Returns a FLOAT value.

celcius This is a float value that represents the Celsius reading.

 

Hookup

 

 

This program takes a reading from the DS1620 then converts the Celsius reading to Fahrenheit and displays them both.

Program 1 download it here

func main()
  dim celcius as float
  dim fahrenheit as float


  DS1620init(0,1,2)

again:

   celcius = ds1620readtemp(0,1,2)
   fahrenheit = CelsiustoF(celcius)
   print {0.1} celsius
   print (0.1) fahrenheit

   pause 500
   goto again

endfunc

include \lib\Dios1620.lib

 

 

Parts list

Easy RS232 Driver  

DiosPro 28 Pin Chip

Dios 32 Pin Carrier (Carrier #1)

SN754410 Motor Controller

16 Pin Dip Heat Sink

Easy Motor PCB

6 Cell Battery Holder

9v Battery Clip

7805

9 Pin Cable

Breadboard Regulator

 

Copyright © 2001 - 2007 Kronos Robotics