Sensorsoft ST6105C User Manual - page 19
Sensorsoft Thermometer User Manual
SENSORSOFT DEVICE STATUS BYTE FORMAT
BIT
NAME
DESCRIPTION
0
Low power supply
Voltage is unacceptable for reliable operation
1 IRQ
enable
N/A
2 IRQ
pending
N/A
3
Power-up
Sensorsoft device just powered-up
4
Tamper
Sensor element is disconnected or broken
5 NV
option
N/A
6 EEPROM
fail
N/A
7 Future
use
N/A
A logic one condition on any of these bits indicates the condition is set or active. Otherwise they
are reset to logic zero. It is a good practice for the host to check the status of the Sensorsoft
device on a regular basis in case a bit changes state.
If bit 0 is set, this indicates that the Sensorsoft device power supply voltage is too low.
When bit 3 is set, this indicates that the Sensorsoft device has just powered-up. This bit gets reset
after the status is read.
When bit 4 is set, this indicates that the sensor element has become damaged, disconnected or is
being subjected to a high level of RFI (radio frequency interference) or EMI (electro magnetic
interference).
Bits 1,2,5,6 and 7 can be ignored, they are not used.
Converting DATA-byte(s) to temperature readings
In response to a temperature command the Sensorsoft Thermometer returns two bytes in the
DATA-byte(s) placeholder, as described below.
It is the job of the host software to convert the DATA-byte(s) to a floating-point number. It is
then possible to display readings in Celsius or Fahrenheit scale. The following procedure explains
the steps required:
1.
Check the value of the most significant DATA-byte. If it is FFh the number is negative and
requires processing by steps 2,3,4 and 5. If it is 00h the number is positive and requires
processing by steps 3 and 5.
2.
Invert the bits of the least significant DATA-byte, then add 1 to it.
3.
Convert the least significant DATA-byte to a floating-point number.
4.
Multiply the previous by -1 to get the negative result.
5.
To obtain a temperature in Celsius, divide the previous result by 2. For Fahrenheit, multiply
the Celsius value by 9, divide by 5 and add 32.
19