Temperature data logging
with the DS1621
Temperature Sensor
Download this file direct
to com1, plug a null modem cable into COM1 on your PC, run
Hyper Terminal and open the file direct to com1.
Temperature=00## will then be displayed and the value
will be updated every two seconds.
' Example : DS-IM II DS1624/DS1621 Temperature sensor (optional) reading
'
' Read the current temperature @ 1oC accuracy and send to a RS232 device
connected
' to the DS-IM II RS232 port every two seconds e.g. PC (null modem cable
required)
'
' Created : 2/5/02 Revision : 1.00 Written by : Designer Systems
'
Dim RS232 As New oSerial
Dim RTS As New oDio1
Dim Temp As New oi2c
Sub Main ()
RS232.Mode = 0
RS232.Baud = cv9600
RS232.Operate = cvOn
RTS.IOline = 24
RTS.Direction = cvOutput
RTS = cvOff
Temp.Node = &h48 'Shifted right 1 bit
Temp.Width = cv8bit
Temp.Mode = cv10bit
Temp.NoInc = cvFalse
Temp.Location = &hee
Temp.Value = 0
do
Temp.Location = &haa
RS232.String = "Temperature = "+str$(Temp)+chr$(&h0d)
oopic.delay = 200
loop
End Sub