Communication Protocols
Table 8-1 Example of Routine to Calculate CRC
unsigned short calccrc(char *message)
{
unsigned short crc = 0;
for ( ; *message != (char)0; +)
crc = updcrc(*message & 0xff, crc);
return (crc);
}
Table 8-2 Example of Routine to Calculate CRC-CCITT without Lookup Table
#define BITS_PER_CHAR 8
unsigned short updcrc (unsigned short ch, unsigned short crc)
{
register short counter = BITS_PER_CHAR;
register short temp = crc;
while (--counter >= 0)
if (temp & 0x8000) {
temp <<= 1;
temp += (((ch <<= 1) & 0x0100) != 0);
temp ^= 0x1021;
}
else {
temp <<= 1;
temp += (((ch <<= 1) & 0x0100) != 0);
}
return(temp);
}
8-15
Содержание SmartPass AI1611
Страница 4: ......
Страница 17: ...A Glossary...
Страница 18: ......
Страница 22: ...SmartPass Integrated Reader 2450 MHz High Voltage System Guide A 6...
Страница 23: ...B System Specifications...
Страница 24: ......
Страница 26: ...SmartPass Integrated Reader 2450 MHz High Voltage System Guide B 4...
Страница 27: ...C Wiring Tables...
Страница 28: ......
Страница 32: ...SmartPass Integrated Reader 2450 MHz High Voltage System Guide C 6...
Страница 33: ...1 Introduction...
Страница 34: ......
Страница 40: ...SmartPass Integrated Reader 2450 MHz High Voltage System Guide 1 8...
Страница 41: ...2 Preparing the Site...
Страница 42: ......
Страница 52: ...SmartPass Integrated Reader 2450 MHz High Voltage System Guide 2 12...
Страница 53: ...3 Quick SmartPass Test...
Страница 54: ......
Страница 63: ...4 Installing Tags on Vehicles...
Страница 64: ......
Страница 71: ...5 Installing SmartPass...
Страница 72: ......
Страница 90: ...6 General Software Information...
Страница 91: ......
Страница 99: ...SmartPass Integrated Reader 2450 MHz High Voltage System Guide 6 10...
Страница 100: ...7 Modes of Operation...
Страница 101: ......
Страница 106: ...8 Communication Protocols...
Страница 107: ......
Страница 124: ...9 Commands...
Страница 125: ...SmartPass Integrated Reader 2450 MHz High Voltage System Guide 9 2...
Страница 174: ...10 Troubleshooting...
Страница 175: ......
Страница 179: ...SmartPass Integrated Reader 2450 MHz High Voltage System Guide 10 6...