Avatar of greenbug2002
greenbug2002
 asked on

Vb.net CRC16 calculator

Hi I need a little help
I am trying to calculate crc-16 checksum in VB.net
I need to use polynomial 1021 with the input and result reflected,
initial value of 0 and final Xor value 0xFFFF
so if I input Bytes FF FF FF FF 00 0B 66 1A  a CRC of 2CFB is returned
I have found an online JavaScript tool at http://www.sunshine2k.de/coding/javascript/crc/crc_js.html but I need it in Vb.Net and have no idea how to convert the code

a simple textbox and Button vb.net app would be perfect
Visual Basic.NET

Avatar of undefined
Last Comment
Dr. Klahn

8/22/2022 - Mon
Dr. Klahn

Which version of CRC-16 are you trying to calculate?  There are about a dozen and they are not interchangeable.
greenbug2002

ASKER
Hi Thanks for the Reply
its a CCITT Version
•Width = 16 bits
•Truncated polynomial = 0x1021
•Initial value = 0
•Input data is reflected
•Output CRC is reflected
• XOR 0xFFFF is performed on the output CRC
hope this helps
SOLUTION
Dr. Klahn

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
greenbug2002

ASKER
Hi thanks I did look at that and had an extensive google around trying to figure it out for myself but the code used its a bit beyond me I am quite new to programing could you pull it into a working example?
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
greenbug2002

ASKER
Also looking at the code I don't think it has support for reflecting the input and output
ASKER CERTIFIED SOLUTION
David Johnson, CD

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
greenbug2002

ASKER
Hi Thanks for the replay I did but its not capable of reflecting the input and output and I have no idea how to program it to
Dr. Klahn

Two correct references to available solutions provided.  No further input from requester.  Points assigned to contributors.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.