Download AN420 - Simple Sensor Application Kit

Transcript
DS18S20_Read
float DS18S20_Read (int UnitNbr, int Units, float *Degrees);
FUNCTION DESCRIPTION
Reads the temperature value of the specified DS18S20. The device must have already been sent
the convert command and the required delay time (750 ms) must be completed.
PARAMETERS
UnitNbr
unit number of the desired DS18S20. If the unit number is -1, then use the
Skip ROM command. This is valid if there is only a single 1-Wire device on
the bus.
Units
OW_OPT_DEGC = degrees C
OW_OPT_DEGF = degrees F
Degrees
address to place floating result.
RETURN VALUE
OW_ERR_SUCCESS = success.
OW_ERR_INVALID_UNIT = illegal unit number.
OW_ERR_INVAlID_CRC = invalid CRC.
SEE ALSO
OWInit, OWSearchROM, DS18S20_Init
022-0141 Rev. B
21