* * *

Author Topic: HASH: CRC-16  (Read 4769 times)

Thaddy

  • Hero Member
  • *****
  • Posts: 6130
Re: HASH: CRC-16
« Reply #15 on: September 17, 2017, 09:43:57 pm »
Marco, I can add it, but are you sure that is OK? It only uses 15 bits.. that's wrong.. (Basically all other CRC16's are actually 17 bits, yup, within a word ;) , through the shift-out shift-in ) But if it is a common one and you can test it, I will include it.
See https://en.wikipedia.org/wiki/Cyclic_redundancy_check

Sure it is not a CRC15? Can you identify it for me in that wiki table? Appreciated.
« Last Edit: September 17, 2017, 09:48:42 pm by Thaddy »
I might not give the answer that you want me to.. Peter Green 1969

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6242
Re: HASH: CRC-16
« Reply #16 on: September 17, 2017, 09:47:58 pm »
No, leave it out. It was a long time ago.

As it happens that customer recently got live again, so maybe I'll pick it up in the near future.

Thaddy

  • Hero Member
  • *****
  • Posts: 6130
Re: HASH: CRC-16
« Reply #17 on: September 17, 2017, 09:50:29 pm »
Posts crossed: can you identify it? I am curious and will test $BEEF ;)
'123456789'
I might not give the answer that you want me to.. Peter Green 1969

Thaddy

  • Hero Member
  • *****
  • Posts: 6130
Re: HASH: CRC-16
« Reply #18 on: September 24, 2017, 09:26:06 am »
I delved in my sources, and it seems that microchip uses a different algo, I added a CCIT implementation in the same vein for reference.

I have the references for your implementation now and will include it.
It is called a CLASSB_CRC16 (without reflection) a.k.a. RF69 as used in e.g. radio communications and sensors. See ATMEL, Microchip, ISO/IEC CD 14443-3.3  appendix B.
It is NOT CCITT compliant, although it uses the same start value of zero, $1021 it uses a different polynomial using only 15 bit, but a very common implementation in hardware, so it should be in.
« Last Edit: September 24, 2017, 09:43:19 am by Thaddy »
I might not give the answer that you want me to.. Peter Green 1969

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus