472,331 Members | 1,521 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,331 software developers and data experts.

Sending chr(255) to serial port

...
Hi

I need to send a chr(255) to a serial port. When I send it, through
comm.write (chr(255)) it sends a chr(63) ... in Hex, I write chr(&FF) and it
actually sends chr(&3F) ... why does this happen, and how can I send it
right ?

I'm using vb.net 2005 express with framework 2.0

Thanks for an answear ...

Mike
Jul 31 '06 #1
3 3607
.... wrote:
I need to send a chr(255) to a serial port. When I send it, through
comm.write (chr(255)) it sends a chr(63) ... in Hex, I write chr(&FF) and it
actually sends chr(&3F) ... why does this happen, and how can I send it
right ?
How are you verifiying what is being sent? Can you show some code you
are using that demonstrates the problem? What encoding are you using?

Jul 31 '06 #2
See my reply in the .dotnet.general newsgroup.

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.
Jul 31 '06 #3
...
Hi Chris

I'm using "Classic" writing to the port ... something like

Comm.write (chr(255) + chr(30) + ...)

I installed a Comm Spy program to capture everything that flows across the
serial port. The machine doesn't work as it was supposed, so I decided to
"listen" to the stream and noticed that.

I'm not using any encoding. I supposed there was no need for it ... :|

Thanx

Mike
-----------------------

"Chris Dunaway" <du******@gmail.comescreveu na mensagem
news:11**********************@i42g2000cwa.googlegr oups.com...
... wrote:
>I need to send a chr(255) to a serial port. When I send it, through
comm.write (chr(255)) it sends a chr(63) ... in Hex, I write chr(&FF) and
it
actually sends chr(&3F) ... why does this happen, and how can I send it
right ?

How are you verifiying what is being sent? Can you show some code you
are using that demonstrates the problem? What encoding are you using?

Jul 31 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Sells, Fred | last post by:
I'm using MSW XP Pro with Python 2.4 to develop but production will be Linux with Python 2.3. (could upgrade to 2.4 if absolutely necessary) I can...
12
by: ken | last post by:
Hello everyone, I'm new to visual VB and I am trying to setup communications to the outside world. I found the example listed below in the help...
19
by: ... | last post by:
Hi I need to send a chr(255) to a serial port. When I send it, through comm.write (chr(255)) it sends a chr(63) ... in Hex, I write chr(&FF) and...
3
by: James Prato | last post by:
In C, how do you read data fields from a file that are separated/delimited by a chr(255)? For example, Field1chr(255)Field2chr(255), etc where...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: CD Tom | last post by:
This happens in runtime 2013 and 2016. When a report is run and then closed a toolbar shows up and the only way to get it to go away is to right...
0
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.