Solved

Com Port Programming

Posted on 2004-09-16
4
195 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
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 …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

752 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