Could some help me to convert this CRC 16 routine to VB. Net please ?
Please refer to http://rfc.net/rfc1662.html for algorithm if necessary. thanks
Thank in advance.
uint16_t au16CRC16Tble[256] = //__attribute__ ((progmem)) =
{
0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf,
* Please note : some elements of this array deleted because it is too long.
0xf78f, 0xe606, 0xd49d, 0xc514, 0xb1ab, 0xa022, 0x92b9, 0x8330,
0x7bc7, 0x6a4e, 0x58d5, 0x495c, 0x3de3, 0x2c6a, 0x1ef1, 0x0f78
};
uint16_t CRC16_u16Byte (uint8_t u8Octet, uint16_t u16CRC)
{
return ((u16CRC >> 8) ^ au16CRC16Tble[(u16CRC ^ u8Octet) & 0x0FF]);
}
Please refer to http://rfc.net/rfc1662.html for algorithm if necessary. thanks
Thank in advance.
uint16_t au16CRC16Tble[256] = //__attribute__ ((progmem)) =
{
0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf,
* Please note : some elements of this array deleted because it is too long.
0xf78f, 0xe606, 0xd49d, 0xc514, 0xb1ab, 0xa022, 0x92b9, 0x8330,
0x7bc7, 0x6a4e, 0x58d5, 0x495c, 0x3de3, 0x2c6a, 0x1ef1, 0x0f78
};
uint16_t CRC16_u16Byte (uint8_t u8Octet, uint16_t u16CRC)
{
return ((u16CRC >> 8) ^ au16CRC16Tble[(u16CRC ^ u8Octet) & 0x0FF]);
}