Sensorsoft Thermometer User’s Manual
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 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 without a 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 SSDP commands to the Sensorsoft device
Each command packet your host sends to the Sensorsoft device must be in the following format:
<CMD-byte> <PACKETlength-bytes> <ADDRESS-bytes> <ARGUMENT-byte> <CRC-bytes>
CMD-byte
A single byte command indicating the desired action you want the Sensorsoft device to perform.
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. This is always
“decimal 1.”
ARGUMENT-byte
The number of the Sensorsoft Thermometer's internal register or variable you want to read or
write. This byte is required for commands that request temperature readings. This byte is not
required for the status command.
CRC-bytes
A two byte (16 bit) Cyclic Redundancy Check that is calculated on the entire packet from the
CMD byte to the last ARGUMENT byte or ADDRESS byte. In the examples below, the last two
bytes in each command string are CRC bytes that were pre-calculated.
19
Содержание ST6105C
Страница 2: ......