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 use cookies on our website. By continuing to use our website, you consent to the use of cookies. With your consent, we will also use marketing cookies. For more information about our cookies, please read our Data Protection Declaration.