Find Jobs
Hire Freelancers

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

$30-250 USD

Completed
Posted almost 5 years ago

$30-250 USD

Paid on delivery
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 CRC-CCITT (MCRF4XX) 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.
Project ID: 20044736

About the project

7 proposals
Remote project
Active 5 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
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 in 2 days
4.9 (1707 reviews)
7.9
7.9
7 freelancers are bidding on average $135 USD for this job
User Avatar
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. Until this time, I have been working on development while considering credit as the best. If you hire me, I promise to give you the greatest service. If you want to conceive more ideas and make it happen, give me a chance. Hope your kind contact. Regards. Lian.
$200 USD in 2 days
4.8 (73 reviews)
6.3
6.3
User Avatar
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. Looking forward to hearing from you. Thanks.
$200 USD in 7 days
4.9 (35 reviews)
5.3
5.3
User Avatar
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 Thanks
$61 USD in 1 day
4.9 (38 reviews)
4.5
4.5
User Avatar
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 perfectly and you will get the best result. Thanks for your attention. Best regards.
$140 USD in 7 days
5.0 (4 reviews)
4.3
4.3
User Avatar
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 testing and debugging. Manage a team of few programmers. Сomplex solutions for students of computer science and mathematics I'm flexible with my working hours and am happy to work closely with any existing freelancers you work with.
$155 USD in 3 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED STATES
Mebane, United States
5.0
26
Payment method verified
Member since Feb 2, 2009

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.