
Function start temperature conversion
START
Send protocol EE (hex) to start temperature conversion
END
Function read temperature
START
Call function read_from_ds1620 to get the temperature
END
Function read_from_ds1620
START
Set RST bit to 1
Read 9-bit serial temperature data from DS1620
Set RST bit to 0
END
Function display temperature
START
IF temperature is negative THEN
Get 2's complement of the temperature reading
Divide temperature by 2 to get real temperature
Set digit 1 to display letter `E'
Display temperature digits
ELSE
Divide temperature by 2 to get real temperature
Display temperature digits
ENDIF
END
Program Listing
The full program listing is given in