Sensorsoft ST6105C User Manual - page 16
Sensorsoft Thermometer User Manual
Writing programs for the Sensorsoft Thermometer
The following describes how to write your own programs for the Sensorsoft Thermometer. This
Sensorsoft device uses a binary, packet-formatted, master-slave protocol. All data is represented
in the
little endian format
- least significant byte is first and the most significant byte is last.
Your host computer (master) must send commands to and receive responses back from the
Sensorsoft device (slave).
Use the following parameters when programming the serial port where the Sensorsoft device is
connected:
Bit rate: 1200 bps
Bits:
8
Parity:
none
Stop bits:
1
Flow control: none
Null discard:
do not strip NULL bytes
In order to make use of the port powered feature of the Sensorsoft device you must enable serial
port lines DTR and RTS when the port is opened. A delay of 1-2 seconds is required after
opening the serial port before any commands are sent to the Sensorsoft device. This delay allows
the Sensorsoft device to power-up correctly before it receives any commands and prevents
incorrect readings.
You should also be aware that the Sensorsoft device has an inter-packet retry time-out delay. This
delay is one (1) second and is encoded into the Sensorsoft device’s firmware. If your program
sends a command to the Sensorsoft device and it receives no response, your program must wait at
least one (1) second before re-sending that command. Possible reasons that a Sensorsoft device
may ignore your commands can be due to data transmission (CRC) errors or improper power-up
delay during hot plugging.
Sending commands to the Sensorsoft Thermometer
Each command packet your host sends to the Sensorsoft Thermometer must be in the following
format:
CMD-byte
A single byte command indicating the desired action the Sensorsoft Thermometer device should
carry out.
PACKETlength-bytes
Two bytes indicating the total length of the packet from start to finish (includes CRC bytes).
ADDRESS-bytes
The six-byte (48-bit) address of the device you are sending the command to. For RS232
Sensorsoft devices this is always decimal 1.
16