Back to home

Serial Checksum

Compute SUM8, XOR8, LRC and the common CRC-8 / CRC-16 variants for one frame

Frame
6 bytes
Checksums
  • Sum-8
    0x0E
  • XOR-8 (NMEA)
    0x08
  • LRC (Modbus ASCII)
    0xF2
  • CRC-8/MAXIM
    0x07
  • CRC-16/MODBUS
    low byte first: C5 CD
    0xCDC5
  • CRC-16/CCITT-FALSE
    0x0428
  • CRC-16/XMODEM
    0x0A38
6 bytes

Sum-8 adds the bytes and keeps the low 8 bits; XOR-8 is what NMEA-0183 uses; LRC is the two's complement of that sum for Modbus ASCII; CRC-16/MODBUS goes on the wire low byte first. Everything runs locally.