469,318 Members | 1,937 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,318 developers. It's quick & easy.

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 3468
.... 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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Sells, Fred | last post: by
12 posts views Thread by ken | last post: by
19 posts views Thread by ... | last post: by
3 posts views Thread by James Prato | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
reply views Thread by listenups61195 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.