posted 16 years ago
Hi all,
I'm having problems for calculating the checksum of a message that aI have to send to a serial port.
I don't understand the manual and I don't know how to do it.
I have a method that send the message to the Outputstream including the STX and ETX but I don't know how to include the checksum.
Here is what I have:
Reading the manual I have this information:
The standard LRC is calculated using a seed value of 0, and bitwise XORing each byte following the STX, including the ETX. This value is transmitted as a single ASCII character immediately following the ETX as the fincal character of the record.
Any of you can help me ? I 'm really lost.....
Thank you in advance for your help.