Solved

Com Port Programming

Posted on 2004-09-16
4
196 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

636 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