Hi Martin,
Sorry - my know how is to small
i have attach the file CCITT16-02.fcfx
for this databytes i have to calculate the checksumme
CRC16 Polynominal 0x8404 and invert the result in two bytes.
with PIC16F18877, he have a funktion for Cylic redundancy check (CRC) Module
but if is working with software is also O.K
the endresult must be O.K
can you please help ?
regards
Hermann
CRC-16 Component
-
- Posts: 7
- http://meble-kuchenne.info.pl
- Joined: Fri Jun 11, 2021 6:44 pm
-
- Valued Contributor
- Posts: 980
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 105 times
- Been thanked: 516 times
Re: CRC-16 Component
Hi Hermann,
First save the .fcpx file (from the first post) into a directory (for example c:\Flowcode)
Then add this directory to Flowcode's search using 'Build->Customise-Locations'
Okay I have G:\Flowcode (it's a long story - you're probably using C:\ )
Then you need to have your data in a byte array - I've modified your code to do this: I;ve set the polynomial to 0x8404 - if you need to invert the CRC you can either change the value of XorOut to 0xFFFF
or use the ~ operator (and do .crc = ~.crc) Martin
First save the .fcpx file (from the first post) into a directory (for example c:\Flowcode)
Then add this directory to Flowcode's search using 'Build->Customise-Locations'
Okay I have G:\Flowcode (it's a long story - you're probably using C:\ )
Then you need to have your data in a byte array - I've modified your code to do this: I;ve set the polynomial to 0x8404 - if you need to invert the CRC you can either change the value of XorOut to 0xFFFF
or use the ~ operator (and do .crc = ~.crc) Martin
Re: CRC-16 Component
hi there
i am new to this forum so i hope posting here is ok?
i have been looking into generating 8 bit crc's from 6 8 bit bytes. i have flowcode 9 and was hoping to experiment with your crc component
but i cant get it to appear in the components list. i added the path to flowcode as described but no joy.
thanks from steve
i am new to this forum so i hope posting here is ok?
i have been looking into generating 8 bit crc's from 6 8 bit bytes. i have flowcode 9 and was hoping to experiment with your crc component
but i cant get it to appear in the components list. i added the path to flowcode as described but no joy.
thanks from steve
-
- Matrix Staff
- Posts: 1266
- Joined: Sat Dec 05, 2020 10:32 am
- Has thanked: 168 times
- Been thanked: 279 times
Re: CRC-16 Component
hi steve
thanks for the reply. i wondered if that may be the case.
cheers,
steve
thanks for the reply. i wondered if that may be the case.
cheers,
steve
Re: CRC-16 Component
Hi Steve,
Hi Martin,
Sorry i was ill.
Thank you for help
But the result is always wrong
i have for example 9 databyte,
4d 56 57 02 80 00 19 00 00,
CRC-CCITT16 Polynom 0x8408,
the result from other system inverted is 69 CD,
Do you have a good idea ?
i have Flowcode V10,PIC16F18877,
regards
Hermann
Hi Martin,
Sorry i was ill.
Thank you for help
But the result is always wrong
i have for example 9 databyte,
4d 56 57 02 80 00 19 00 00,
CRC-CCITT16 Polynom 0x8408,
the result from other system inverted is 69 CD,
Do you have a good idea ?
i have Flowcode V10,PIC16F18877,
regards
Hermann
-
- Valued Contributor
- Posts: 980
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 105 times
- Been thanked: 516 times
Re: CRC-16 Component
Hi Herman,
I checked using the online checker - mentioned in the first post. There seem to be a range of algorithms / polynomials - and 0x8408 isn't one on that site.
If you can post (or PM) your code = and result you are getting I'll take a look and see if i can work out what is going awry..
Martin
I checked using the online checker - mentioned in the first post. There seem to be a range of algorithms / polynomials - and 0x8408 isn't one on that site.
If you can post (or PM) your code = and result you are getting I'll take a look and see if i can work out what is going awry..
Martin
Re: CRC-16 Component
Thank you Herman for creating this component.
I've played around much with various CRC8's and CRC16's on various projects in the past, with some micro's sporting a hardware CRC engine and others not, so will doubtless be of great use to many people![Smile :)](./images/smilies/icon_e_smile.gif)
crccalc.com is nice and simple, though just giving a shout to the CRC location of Sunshine's website that I've used many times to validate calculated CRC's, with further explanations/information/features...
http://www.sunshine2k.de/coding/javascr ... rc_js.html
I've played around much with various CRC8's and CRC16's on various projects in the past, with some micro's sporting a hardware CRC engine and others not, so will doubtless be of great use to many people
![Smile :)](./images/smilies/icon_e_smile.gif)
crccalc.com is nice and simple, though just giving a shout to the CRC location of Sunshine's website that I've used many times to validate calculated CRC's, with further explanations/information/features...
http://www.sunshine2k.de/coding/javascr ... rc_js.html