Advertisement

07.18.2007 at 10:26AM PDT, ID: 22704832
[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

C#, converting BCD array to numbers

Asked by CantonMarko in C# Programming Language

Tags:

I have a project that I am working on that requires me to read data in through a serial port and then process it.  I am able to read the data in, however, it is in BCD format and I am not sure how to translate the data into numbers.  

I read the port like this:
  if (receivedData.Length < 25)
            {
               //receivedData += serialPort1.ReadLine();
                while (receivedData.Length < serialPort1.ReceivedBytesThreshold)
                {
                    receivedData = receivedData + serialPort1.ReadLine();
                    if (receivedData == "")
                    {
                       
                    }
                }
            }
receivedData becomes a 24 byte array.  From there I have to be able to read the first 11 bytes of data, as well as the 17th and 18th byte.  I am able to read 17 and 18 but have no clue as to how to read and dicypher 1 through 11.

I am reading 17 this way:

lblFbLast.Text = Strings.Chr((Strings.Asc(receivedData.Substring(17, 2)) / 16) | 48).ToString() + Strings.Chr((Strings.Asc(receivedData.Substring(17, 1)) % 16) | 48).ToString();

And I read 18 this way:

lblFbBall.Text = Strings.Chr((Strings.Asc(receivedData.Substring(18, 2)) / 16) | 48).ToString() + Strings.Chr((Strings.Asc(receivedData.Substring(18, 1)) % 16) | 48).ToString();

But I have to read the first ten bytes and put them into a string that I can display and commit to a database.  I am clueless when it comes to this stuff.  Any help you can offer will be appreciated.

Start Free Trial
 
Loading Advertisement...
 
[+][-]07.18.2007 at 11:02AM PDT, ID: 19515839

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.18.2007 at 11:13AM PDT, ID: 19515962

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 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.18.2007 at 11:20AM PDT, ID: 19516013

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.18.2007 at 11:24AM PDT, ID: 19516046

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 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.18.2007 at 11:46AM PDT, ID: 19516230

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.18.2007 at 11:48AM PDT, ID: 19516255

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.18.2007 at 12:40PM PDT, ID: 19516651

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 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.18.2007 at 01:32PM PDT, ID: 19517113

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.18.2007 at 01:36PM PDT, ID: 19517148

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 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.18.2007 at 01:45PM PDT, ID: 19517213

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.18.2007 at 01:54PM PDT, ID: 19517297

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.18.2007 at 01:57PM PDT, ID: 19517315

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.18.2007 at 02:00PM PDT, ID: 19517330

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 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.18.2007 at 02:12PM PDT, ID: 19517407

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.19.2007 at 10:35AM PDT, ID: 19524143

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 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.19.2007 at 10:40AM PDT, ID: 19524191

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.22.2007 at 09:45PM PDT, ID: 19545101

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.22.2007 at 09:53PM PDT, ID: 19545130

View this solution now by starting your 7-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: C# Programming Language
Tags: bcd
Sign Up Now!
Solution Provided By: JimBrandley
Participating Experts: 2
Solution Grade: A
 
 
 
Loading Advertisement...
20081112-EE-VQP-42