Convert C/C++ Code to Excel VBA Code for Checksum CRC Commands VB Visual Basic

We need you to take existing C/C++ code that correctly calculates CRC outputs for 16 bit CCITT CRCs and turn it into something we can use in Excel using VBA. Or if you feel comfortable just writing this directly in VBA, that works just as well. We just need a working method to reliably calculate these 2 main types of CCITT 16 bit CRC types using Excel when we supply it a string of hex characters.

Here are some resources that might be helpful.

[login to view URL]

[login to view URL]

[login to view URL]

[login to view URL]

A bit more technical details about the CRC we are calculating and some resources, examples and how to calculate novel values online as well.

CRC-CCITT = 0x1021 = x16 + x12 + x5 + 1

Online CRC Calculator for CRC2 and CRC3

[login to view URL]

Test Data Sequence = %01%07%02%05%02%00%01%00%00 (so it is treated as hex)

CRC order = 16

CRC polynom = 1021

Initial values = 1D0F or FFFF or 0000

Final XOR value = 0

CRC1 cannot be calculated here, see above for instructions on how to calculate

CRC2 = reverse data bytes, reverse CRC result before Final XOR

CRC3 = no reverse data bytes, no reverse CRC result before Final XOR

CRC2 with 0xFFFF CRC Offset Working Example


Result Check Poly Init RefIn RefOut XorOut

0xF083 0x6F91 0x1021 0xFFFF true true 0x0000

01 01 07 02 05 02 00 01 00 00 [65 A8] 04

^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ = CRC Calculations (Ignore other values, so 01 and the CRC and 04)

The returned CRC value is A865, which is then flipped to be 65 A8.

Note it is calculating the value based on 01 07 02 05 02 00 01, ignoring the first 01 and the last 04. Also note that it flips the order of the CRC values so they can be used. Something like =RIGHT(A1,2)&LEFT(A2,2) will do that in Excel.

Here are 4 samples with the CRC values already calculated using CRC2 with 0xFFFF CRC Offset.

tx: 01 01 07 02 05 02 00 01 00 00 [83 F0] 04

rx: 01 01 0C 02 00 00 00 F6 40 00 00 3F 08 00 00 [FD B0] 04

tx: 01 01 07 02 05 02 01 01 00 00 [38 EC] 04

rx: 01 01 0C 02 00 00 00 FE 40 00 03 21 09 00 00 [B2 B7] 04

There are a total of 6 "types" of CRC outputs that need to be correctly calculated but there are only two main types, they just use a different initial value. Both CRC types use the same 0x1021 poly.

CRC2 has three types, changing the init values.

CRC2 = CRC-16-CCITT: Polynomial 1021h (MCRF4XX, Kermet)

width=16 poly=0x1021 init=0x1D0F (or 0xFFFF or 0x0000) refin=true refout=true xorout=0x0000 check=0x6f91 residue=0x0000

CRC3 has three types, changing the init values.

CRC3 = CRC-16-CCITT: Polynomial 1021h (CRC-16/AUG-CCITT, XModem)

width=16 poly=0x1021 init=0x1D0F (or 0xFFFF or 0x0000) refin=false refout=false xorout=0x0000 check=0xe5cc residue=0x0000

Also attaching a full sheet of examples to make testing easier. Please see attached files.

It would be nice if you could make a single Excel command to calculate the CRC1 type as well. It is trivially easy to calculate and could probably be done with a single Excel command but it would be nice to be able to do it with VBA. Please see examples for CRC1 as well.

In summary, this project needs to make sure it does the following:

It should do basic error detection to ensure that it does not calculate junk values. We are calculating hex values only.

It should be able to read a string that has a CRC already included and determine what type it is.

It should be able to determine if there is already a CRC calculated in the data.

The above should be able to read a series of HEX values and return just the CRC.

The above should be able to read a series of HEX values and return the entire command with the CRC placed right before the final 04 command.

Note that the Tx and Rx commands always dictate the length of the string (in hex) as the third byte from the left. See attached image for clarification.

Квалификация: Программирование на С, Программирование на C++, Excel, VB.NET, Visual Basic

Показать больше convert excel vba application, convert excel vba sql, convert excel vba dll, convert excel vba macro standalone application, convert excel vba access, convert excel vba, convert excel vba visual basic, convert excel file pdf ms access vb, convert excel vba open office calc, convert excel vba openoffice, convert excel vba project access, convert excel vba openoffice basic, convert excel vba open office basic, convert excel vba calc, convert excel vba openoffice calc, convert excel vba macros openoffice calc

О работодателе:
( 23 отзыв(-а, -ов) ) Mebane, United States

ID проекта: #20044736



Hello I know both C++ and VBA and I have extensive experience with converting converting code from one programming language to another one. Also, I am familiar with calculating CRC algorithms and bitwise operations

$77 USD за 2 дней(-я)
(1634 отзывов(-а))

10 фрилансеров(-а) в среднем готовы выполнить эту работу за $134


Hi, sir! I checked your project carefully. I have a deep understanding of the problems you are going to realize in your project. They are not so difficult for me with 12 years of vba development experience. Un Больше

$200 USD за 2 дней(-я)
(59 отзывов(-а))

[login to view URL] I am very happy to bid your project. i'd like to work with you. I read your requirements carefully,i see what you mean. i've been experienced with C Programming, C++ Programming, Excel, VB.NET, Visual Basic Больше

$111 USD за 1 день
(42 отзывов(-а))

Hi. How are you? I read your description carefully and am very interesting in your project. I can start right now and can help you. If you hire me,i will do my best for your job and you can get the best results. Lookin Больше

$200 USD за 7 дней(-я)
(30 отзывов(-а))

Hi I have Read Your Requirements I am Excel VBA Expert Experianced in VBA Macros & Web Scraping Script... I can finish any kind of vba task in 1 day only pls see my previous projects for my vba experiance T Больше

$61 USD за 1 день
(33 отзывов(-а))

Hi. I hope to see you in chat, to discuss in detail. As you can see from my reviews and profile, I am a experienced developer with full stack knowledge and career on these technologies. I am sure I can do this perfect Больше

$140 USD за 7 дней(-я)
(4 отзывов(-а))

I have many experience more than 5+ years in web and app development field. Budget is not important. I need lowest budget among other your freelancer, because I am a new freelancer and my honor is very important for Больше

$140 USD за 7 дней(-я)
(1 отзыв)

Hi there! My name is Longzhu and I’m a professional developer with 7+ years of experience. I'm honesty, communicable, responsible and passionate about web programming holding my hand on a pulse of a new technologies e Больше

$140 USD за 7 дней(-я)
(0 отзывов(-а))

Hi I'm senior C++, C# developer with experience of image processing and databases. Develop and support application programs for administrative, Web systems using ASP.NET and related tools. Analyze code for system t Больше

$155 USD за 3 дней(-я)
(0 отзывов(-а))

Dear Client. I'm interested in your project and I perfectly can your require to convert VBA to VB. I am a full stack web developer with 7+ years experience and I have excellent skills and experience in the projec Больше

$120 USD за 3 дней(-я)
(0 отзывов(-а))