Changes

Jump to navigation Jump to search
753 bytes added ,  00:17, 23 June 2017
Line 74: Line 74:  
=== Checksum Frame ===
 
=== Checksum Frame ===
 
The Checksum Frame performs a checksum operation on the payload of the data frame, producing an 8-bit output. Receiving boards should perform an identical checksum operation on the data frame, and compare it to the received checksum value to verify data integrity. Identical checksums indicate proper transmission, while mismatched checksums indicate transmission error.
 
The Checksum Frame performs a checksum operation on the payload of the data frame, producing an 8-bit output. Receiving boards should perform an identical checksum operation on the data frame, and compare it to the received checksum value to verify data integrity. Identical checksums indicate proper transmission, while mismatched checksums indicate transmission error.
 +
 +
The current checksum calculation is as follows:
 +
 +
Each byte in the data payload (meaning, data excluding the start and end designators), takes its decimal ASCII value, which is multiplied by its position in the data frame. The sum of these products is the checksum value, which is 8 bytes.
 +
 +
Take the following data frame:
 +
 +
{| class="wikitable"
 +
|\
 +
|1
 +
|H
 +
|E
 +
|L
 +
|L
 +
|O
 +
|/
 +
|0
 +
|}
 +
 +
The checksum is performed on the data payload, meaning only '''HELLO'''. The calculation for each byte in the frame is as follows, following the guideline of taking the position of the character and multiplying that by its ASCII value:
 +
{| class="wikitable"
 +
|72 * 1 (H)
 +
|69 * 2 (E)
 +
|76 * 3 (L)
 +
|76 * 4 (L)
 +
|79 * 5 (O)
 +
|}
 +
 +
The sum of these products is 1,137, the checksum value.
    
== Operation ==
 
== Operation ==

Navigation menu