CRC Help

Antworten
Stek
Beiträge: 5
Registriert: Dienstag 1. Oktober 2013, 11:48

CRC Help

Beitrag von Stek » Donnerstag 18. Oktober 2018, 08:46

Good morning all,

I have purchased a controller that requires a CRC to be generated as part of the communications. I have never come across CRC's so am having a difficult time getting to grips with them, but seeing there is a CRC generator in profi this will assist greatly.
I however am having difficulty getting it set up correctly.
Using an example of "F881" as a data string to send to the device and CRC-CCITT (X16+X8+X5+1 or 1021), most calculators including the linked one on the profi help (http://www.zorc.breitbandkatze.de/crc.html) come to the CRC 8F4F with initial value and final value set at 0. If i type this exact info into profi's CRC i do not get the same answer. Can someone please assist and tell me what i am doing wrong?

Google translated into german:

Guten Morgen alle,

Ich habe einen Controller gekauft, der die Erstellung eines CRC als Teil der Kommunikation erfordert. Ich bin noch nie auf CRCs gestoßen, also habe ich eine schwierige Zeit, sie in den Griff zu bekommen, aber da es einen CRC-Generator in Profi gibt, wird dies sehr hilfreich sein.
Ich habe jedoch Schwierigkeiten, es korrekt einzurichten.
Mit einem Beispiel von "F881" als Datenfolge zum Senden an das Gerät und CRC-CCITT (X16 + X8 + X5 + 1 oder 1021), die meisten Rechner einschließlich der verknüpften auf der profi Hilfe (http://www.zorc.breitbandkatze.de/crc.html) kommen zum CRC 8F4F mit Anfangswert und Endwert auf 0. Wenn ich genau diese Informationen in CRC von profi eintippe, bekomme ich nicht die gleiche Antwort. Kann mir bitte jemand helfen und mir sagen, was ich falsch mache?

abacom
Site Admin
Beiträge: 3917
Registriert: Dienstag 23. September 2008, 10:54
Kontaktdaten:

Re: CRC Help

Beitrag von abacom » Donnerstag 18. Oktober 2018, 11:35

CRC-CITT (to my knowledge):

Width = 16 bits
Truncated polynomial = 0x1021
Initial value = 0xFFFF
Input data is NOT reflected
Output CRC is NOT reflected
No XOR is performed on the output CRC

CRC-CCITT(F881h) = 06CEh


Two-bytes-datastring needs to be generated! (You can´t simply type in!)
Profilab_CRC_CCITT.jpg
Profilab_CRC_CCITT.jpg (65.4 KiB) 2939 mal betrachtet
Breitkatze_CRC_CCITT.jpg
Breitkatze_CRC_CCITT.jpg (66.54 KiB) 2939 mal betrachtet
FF81.prj
(6.06 KiB) 193-mal heruntergeladen
ABACOM support

Antworten

Zurück zu „Thema: Schaltung und Bauteile“