EasyManua.ls Logo

Grow GM65 - Pdf417

Default Icon
60 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
30
8 Serial Port Instruction
Users can settle the module by sending instruction from mainframe.
Please make sure communicate parameter complete matching between module and mainframe.
Module default serial communicate parameter: Baud rate 9600bps; No check; 8 bit data; 1 bit stop
bit; No flow control.
8.1CRC Algorithm
CRC: CRC_CCITT check value (2 bytes).
Suitable for TypesLensAddressDatas;
Characteristic polynomial : X16+X12+X5+1, multinomial coefficient: 0x1021, original value:0 ;
For single byte, the highest bit will be calculated at first, output will be without negation.
Reference code of C:
unsigned int crc_cal_by_bit(unsigned char* ptr, unsigned int len)
{
unsigned int crc = 0;
while(len-- != 0)
{
for(unsigned char i = 0x80; i != 0; i /= 2)
{
crc *= 2;
if((crc&0x10000) !=0)
crc ^= 0x11021;
if((*ptr&i) != 0)
crc ^= 0x1021;
}
ptr++;
}
return crc;
}

Related product manuals