6 ] Crc; 7 ] Id - Denso BHT-6000 User Manual

Denso bar code handy terminal user's manual bht-6000
Table of Contents

Advertisement

[ 6 ] CRC

To check whether data has been transmitted accurately, the BHT-Ir protocol supports
CRC (Cyclic Redundancy Check) which employs the CRC-16 generating system. In
CRC, a CRC character is suffixed to a sequence of DLE ETX of every transmission block.
Operands for CRC-16
The CRC generates CRC-16 from all bytes of a transmission block excluding DLE SOH
or DLE STX characters (which are at the head of a transmission block), DLE character
of DLE ETX and DLE character of DLE DLE in the text.
CRC operation
The CRC system generates CRC-16 as follows: It multiplies the polynomial formed by
aligning all of the bits starting from the LSD of the first byte to the MSD of the last byte
in a transmission block in descending order, by X
the generative polynomial X
Shown below is a data text transmission block and operands for CRC-16 generation.
D
S
L
T
E
X

[ 7 ] ID

ID is a 2-digit hexadecimal and designated in 0000h through FFFFh in (2 bytes). 0000h
is assigned to the host computer. Any of 0001h through FFFFh is assigned to the BHT-
6000 as follows.
• The system sets an ID when the BHT-6000 is initialized.
• You may set an arbitrary ID in System Mode or by using the OUT statement in
BHT-BASIC 3.0.
Chapter 3. Communications Operations of BHT-6000
16
15
2
+ X
+ X
+ 1. The remainder is the value of CRC-16.
I
Serial
Data text
number
D
Operands
117
16
. Next, divide the polynomial by
D
E
C
L
T
R
E
X
C
Operand

Advertisement

Table of Contents
loading

Table of Contents