Solved

Com Port Programming

Posted on 2004-09-16
4
192 Views
Last Modified: 2010-04-23
Hey All,

I am trying to write some code to communicate with a piece of hardware that accepts hex values.

How will i format a string like "AA AA AA AA AA AA" so that it is hex when I send it to the port.

I will be using the serial port component in VB.net.

What I have so far is something liek this

x(0) = &HAA
        x(1) = &HE
        x(2) = &H1
        x(3) = &H0
        x(4) = &H0
        x(5) = &H3
        x(6) = &H52
        x(7) = &H45
        x(8) = &H4C
        x(9) = &H41
        x(10) = &H59
        x(11) = &H23
        x(12) = &H31
        x(13) = &H20
        x(14) = &H3
        x(15) = &HD4

But it doesnt seem to work.  

Any help would be appreciated.
0
Comment
Question by:dspencerpci
4 Comments
 
LVL 96

Accepted Solution

by:
Bob Learned earned 125 total points
ID: 12076849
There is a free community version of Sax.NET in the VB.NET Resource Kit for serial communication:

MSDN:  The Visual Basic .NET Resource Kit
http://msdn.microsoft.com/vbasic/vbrkit/default.aspx

Bob
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now