Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Cant Figure Out Odd CRC

Status
Not open for further replies.

iso9001

New Member
Hi. :?

I'm working on a bus very similar to J1850 that is used in domestic cars. I'm having a problem figuring out just what exactly is going on with the CRC.... I cant find instances of this polynomial anywhere:

X^8 + X^4 + X^3 + X^2 + 1

So none of the google hits and whatnot have helped so far. I have the polynomial and the value that each equation must equall to be valid:

X^7 + X^6 + X^2 (C4 hex)

As well as some examples of valid bytes and thier CRC:

Data Bytes (hex) CRC (hex)
00 00 00 00 = 59
F2 01 83 = 37
0F AA 00 55 = 79
00 FF 55 11 = B8
33 22 55 AA BB CC DD EE FF = C8
92 6B 55 = 8C
FF FF FF FF = 74

What I dont know is how to derive them... Am I supposed to Mod 2 divide the message by the crc byte and expect the answer of C4 ???

Anyone ?
 
[edited lots]

I studied CRC's in my communications class, and CRC's have a pretty funny definition of 'divide'. It's long-division done in binary, but instead of binary subtractions in each stage it's binary exclusive-or. Explaining in detail would mean quoting from the book since I don't have the details memorized, so instead I'd reccomend you take a look at "Understanding Data Communications & Networks" by William A. Shay, 2nd ed, ISBN 0-534-95054-X. Really cool book.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top