LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

CRC- 8 bit algorithm

Solved!
Go to solution

Dear,

 

I need to send 32 bit data packet to a slave device that requires a 8 bit CRC calculation based on Polynomial X^8+X^4+X^3+X^2+1 with init value FF. I am trying to use the Vi made by Matthew _Kelton at https://forums.ni.com/t5/LabVIEW/Computing-CRC/m-p/825331/highlight/true#M375052 but I don't get the result as expected . So for data 0xBF7F1234 with init value FF I should get CRC 8 bits = 0x01 but I getting 9B.

The polynomial should be b100011101.

Any idea how I can implement this using Matthew Kelton Vi?

 

Thanks in advance

0 Kudos
Message 1 of 3
(4,946 Views)

There are MANY variations to CRCs.  Do you have an example code from the device manual or something to show how the CRC was initially generated?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 3
(4,923 Views)
Solution
Accepted by topic author malkowki

Hi,

 

After checking the DUT datasheet, I realized that they use an initial byte [xFF or x00] that defines whether it is a first or second frame from uC. this one is attached to DataByte to be sent to DUT, so the Matheew Kilton CRC vi works when setting "Initial CRC value"=0, "CRC Polynomial=1D" , "CRC Order=8".

 

My program works now.

 

Thanks,

Message 3 of 3
(4,895 Views)