I need to create a CRC which is transmitted as a 2 binary bytes. First the byte with the higher value, then the byte with the lower value is transmitted. The tranmitted CRC 16 is construted in a way so that it always supplements the total CRC to (0000) hex. A string is only valid if the CRC is 0000 (hex). Otherwise the message is ignored.
I have one exemple to my case. For exemple, if the string to send is : b(0)=225; b(1)=4; b(2)=82 and b(3)= 86 in ascii code(as a array of bytes), the out message after created the CRC 16 is b(0)=225; b(1)=4; b(2)=82, b(3)= 86; b(4)=124; b(5)=112. So that, the input message correspond to the string aRV and the output message after created the CRC16 is aRV|p. In attachements I send a vi used to determine the string us
ing the ascii code, and a a library with a aplication that cheks if the crc is zero, But I just have this exaple of correct CRC 16, but in fact I need to calcute the CRC 16 for other strings in the same way. If anyone kows hwo can I do it,please help me in this problem. Thanks.