Herunterladen Inhalt Inhalt Diese Seite drucken

Checksum (Crc16) - DigiTrace TCONTROL-CONT-03 Anleitung

Kompakter mikroprozessorregler
Vorschau ausblenden Andere Handbücher für TCONTROL-CONT-03:
Inhaltsverzeichnis

Werbung

Verfügbare Sprachen

Verfügbare Sprachen

2.8

Checksum (CRC16)

Calculation
scheme
H
Example
The checksum (CRC16) serves to recognize transmission errors. If an error is
identified during evaluation, the device concerned does not respond.
CRC = 0xFFFF
CRC = CRC XOR ByteOfMessage
For (1 to 8)
while (not all ByteOfMessage processed);
The low byte of the check sum is the first to be transmitted, then the
high byte.
Data request: Read two words, starting at address 0x00CE
(CRC16 = 0x92A5)
07
03
00
CE
Response: (CRC16 = 0xF5AD)
07
03
04
00
Word 1
2 Protocol description
CRC = SHR(CRC)
if (flag shifted right = 1)
then
CRC
=
CRC
XOR
0xA001
00
02
A5
CRC16
00
41
C8
Word 2
else
92
AD
F5
CRC16
17

Werbung

Inhaltsverzeichnis
loading

Inhaltsverzeichnis