SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 49 | Next

Jan Axelson

"Serial Port Complete: COM Ports, USB Virtual COM Ports, and Ports for Embedded Systems"

A checksum for ASCII Hex data
Chapter 2
30
can add the values represented by each pair of characters. Intel Hex and Motorola
S-Record are two data formats that uses checksums on ASCII Hex data.
The cyclic redundancy check (CRC) method uses more complex calculations to
obtain checksum values. Protocols that use CRC values include the file-transfer
protocols Kermit, XModem, YModem, and ZModem.
Hash values are very secure checksums produced by message detection code
(MDC) hash functions. To use hash values, the sender and receiver must share a
key, which is a value used in creating the hash value and in verifying the
received data.
A computer that receives data with a checksum can repeat the calculation to
obtain the checksum. If the checksum doesn??™t match the expected value, the
computer knows it didn??™t receive the same data the transmitting computer sent.
A computer that detects an error can notify the sending computer so it can try
again or take other action. After a number of unsuccessful tries, the transmitting
computer can give up, display an error message, or sound an alarm as
needed. A checksum adds little overhead to large data blocks.
A receiving computer should also know what to do if a message is shorter than
expected or if expected data or an end-of-message code doesn??™t arrive. Instead of
waiting forever, the software should eventually time out and can attempt to
notify the sending computer if needed.


Pages:
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61