Спасибо!

Мы исправим ошибку в ближайшее время

Сообщить об ошибке

Site Tools


Send new password

Please enter your user name in the form below to request a new password for your account in this wiki. A confirmation link will be sent to your registered email address.

Set new password for



Reading the Data

The command is designed for reading of the current data: relative level, temperature, frequency.

The command is a sequence of symbols ASCII “D” and “O”. After receipt of the “DO” command the program will response in the form of ASCII symbols sequence.

For example, F=0AF9 t=1A N=03FF.0 <CR><LF>, where F is the current frequency value, t is the current value of temperature in Celcius degrees, N is the level value. All values are in hexadecimal form.

In case the frequency value exceeds FFFh, the data are considered invalid.

Periodic Data Output

The command is designed to switch on periodic data output. After processing the command the sensor performs periodic data output in the text-based form (ASCII codes) of the following data: relative level, temperature, frequency.

The data are being output periodically with an interval set up when cofiguring the sensor (Omnicomm Configurator software). In case the data output interval is set to zero, the data output won't be performed.

Switching on of the periodic data output is done by sending of the “DP” symbols in line. After processing of the command the symbols line will be received. For example, F=0AF9 t=1A N=03FF.0 <CR><LF>, where F is the current frequency value, t is the current value of temperature in Celcius degrees, N is the level value. Turning off of the periodic data output is performed after receipt of any true command, reset of the processor or disconnection of power supply.

Checksum Calculation Algorithm

The checksum is calculated using Dallas APPLICATION NOTE 27 table method: Understanding and Using Cyclic Redundancy Checks with Dallas Semiconductor iButton Products. One can use the following algorithms to calculate the checksum with a polynom ^8 + a^5 + a^4 + 1 (C language):

Version 1:

1 U8 CRC8 (U8 b, U8 crc)
2 {
3   U8 i = 8;
4   do {
5    if ( (b ^ crc) & 0x01) {
6     crc = ( (crc ^ 0x18) >> 1 ) | 0x80;
7    } else {
8     crc >>= 1;
9    }
10   b >>= 1;
11  } while (--i);
12  return crc;
13 }

Version 2:

1 U8 CRC8(U8 data, U8 crc)
2 {
3   U8 i = data ^ crc;
4   crc = 0;
5   if(i & 0x01) crc ^= 0x5e;
6   if(i & 0x02) crc ^= 0xbc;
7   if(i & 0x04) crc ^= 0x61;
8   if(i & 0x08) crc ^= 0xc2;
9   if(i & 0x10) crc ^= 0x9d;
10  if(i & 0x20) crc ^= 0x23;
11  if(i & 0x40) crc ^= 0x46;
12  if(i & 0x80) crc ^= 0x8c;
13  return crc;
14 }