Chapter 9 Appendix
148
unsigned int crc_chk_value(unsigned char *data_value,unsigned char length
{
unsigned int crc_value=0xFFFF;
int i;
while(length--)
{
crc_value^=*dat+;
for(i=0;i<8;i++)
{
if (crc_value&0x0001)
{
crc_value=(crc_value>>1)^0xa001;
}
else
{
crc_value=crc_value>>1;
}
}
}
return (crc_value);
}
Definition of communication parameter address
Read and write function-code parameters (Some functional code is not changed, only for the
manufacturer use.)
Definition of communication parameter address
Read and write function-code parameters (Some functional code is not changed, only for the
manufacturer use.)