2017-03-14 09:23 AM
Hi,
Here is my input data
you assume that I have 4 variables such as Data1,Data2,Data3 and Data4 that store each byte (Data1 saves d24-d31 and Data4 stores D0-D7). So I want to know how can I execute Crc-8 algorithm in these data according to datasheet with SPL library. I would appreciate give me a simple source because I don't have any Idea How I can implement this algorithm form my input data.
2017-03-14 09:36 AM
You'd need to compute in software, the hardware isn't going likely to do this for you.
2017-03-14 10:23 AM
Thanks for your reply.
Actually I want to prevent my communication from noise in long distance.doesn't we have any simple CRC-8 software algorithm?
2017-03-14 10:42 AM
https://www.ien.eu/uploads/tx_etim/Page_24_25_Zettlex_42750.pdf
You'd need to provide a couple of example packets.
What is the final application here? Where will it be used?
2017-03-14 11:54 AM
It isn't that complicated, would need a couple of 32-bit data patterns to validate.
What is the final application here? Where will it be used? Please complete your profile accurately.
2017-03-14 01:19 PM
Thanks for your contributions.
Well , I have got these values:the first bytes are 000255,000098,000197
000255,000225,000029,000033
000098,000225,000029,000032000197,000225,000029,000034Actually I want to decrease and increase speed of a motor with getting valid data. but if my motor starts it tries to make a lot of noise that can destroy my input data. So I want to check crc code to be sure that each received characters are valid.
2017-03-14 09:59 PM
Not able to make the maths work with those numbers..
2017-03-15 01:39 AM
Thanks for your effort
maybe I have got the wrong result.However, thanks for your contributions
2017-03-15 08:16 AM
I don't know, post the link to the data sheet for the specific part you are using, and perhaps the logic analyzer output from the SPI transaction. The command/result phase might take 6 bytes of total transfer back/forth. Present the data as stream of 2 digit hex bytes rather than decimals, ie 0x11,0x22,0x33, etc.
I don't have a way to replicate the hardware.
I tried different initialization, shift direction, and polynomials. The manuals for these parts should provide specific byte/word sequence examples.
2017-03-18 02:52 AM
Dear Clive one
Thanks for your explanation
you are right and it was my fault because my sensor model doesn't provide the CRC calculation and I thought the first byte it is related to CRC bytes.
Thank you so much for your effort and kindness.