[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.8

Checksum (CRC-16) calculation algorithm

Asked by DmitriyAndreyev in Assembly Programming Language

Tags: algorithm, calculation, checksum

I am trying to figure out the Checksum alrorithm used by one of the printers I am working with. I have set up a serial communications monitoring interface and was able to record the "conversation" betwee the device and the printer. At the end of the every data line, sent to the printer, device sends a 16 bit code. I suspect the device and the printer use CRC-16 algorithm to calculate this code.

Example 1 of the "conversation":
--------------------------------------------------------------------------
1) Device:
 4 4 0 4 48 227 86
2) Printer:
16 6
3)Device:
   2 48 0 83 30 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95   95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 13 10 224 62
4) Printer:
 16 21
 
As a result of this "Conversation" a Printer prints 83 underscore characters
--------------------------------------------------------------------------------------------
Here is Example 2 of the recorded conversation:

1) Device:
4 4 0 4 48 227 86
2) Printer:
 16 6
3) Device:
2 48 0 44 31 14 32 32 32 32 32 32 32 32 32 32 32 32 80 82 79 68 85 67 84 32 83 85 77 77 65 82 89 32 32 32 32 32 32 32 32 32 32 32 32 20 13 10 196 130
4) Printer:
 16 21
 
As a result of this conversation, printer Prints “Product Summary” in the middle of the line
------------------------------------------------------------------------------------

I have analized the strings sent by the device and here is what I've come up with.
2, 48, 0 - is likely to be a beginning of the printing command
44 (in exampe 2) and  83 (in example 1) - is likely to be the number of characters to be printed

[224 62] (in example 1) and [196 130] in example 2 is the checksum.

QUESTION:
Find the way to calculate this checksum.

[+][-]05/07/04 03:29 PM, ID: 11018964Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/08/04 10:52 AM, ID: 11022613Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/08/04 04:44 PM, ID: 11023776Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/10/04 06:54 AM, ID: 11031146Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05/10/04 10:35 AM, ID: 11033251Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05/10/04 02:24 PM, ID: 11035316Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/11/04 02:09 PM, ID: 11044721Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05/11/04 02:45 PM, ID: 11045003Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/11/04 03:48 PM, ID: 11045375Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/11/04 04:07 PM, ID: 11045462Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: Assembly Programming Language
Tags: algorithm, calculation, checksum
Sign Up Now!
Solution Provided By: dimitry
Participating Experts: 2
Solution Grade: A
 
[+][-]05/12/04 09:54 AM, ID: 11051827Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/12/04 11:08 AM, ID: 11052488Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05/12/04 11:31 AM, ID: 11052687Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-89