Definition

  1. Initial value:
    checksum = 0
  2. For each byte:
    checksum = checksum + command byte

  3. checksum = checksum &0xff
  4. Convert checksum to ASCII high byte and ASCII low byte

 

Example

  • command = $012[Enter]
  • checksum = 0x24 + 0x30 + 0x31 + 0x32 = 0xB7
  • checksum & 0xff = 0xB7
  • checksum ASCII high byte: ASCII(0x42) = B
  • checksum ASCII low byte = ASCII(0x37) = 7
  • command with checksum = $012B7[Enter]
We gebruiken cookies op onze website. Door onze website te blijven gebruiken, stemt u in met het gebruik van cookies. Met uw toestemming gebruiken we ook marketing cookies. Voor meer informatie over onze cookies kunt u onze gegevensbeschermingsverklaring lezen.