Solved

Sending bytes using the serial com-port

Posted on 1997-07-03
3
238 Views
Last Modified: 2010-04-03
Hi!
I need help whith sending bytes to the serial com-port. Sending Char is no problem, but I want to send Byte. Whith Byte I meen that I want to be able to send 123 in one byte and not in three. How do I do that? I'm using Delphi 2 and overlapped structure on the port, if need to know that.
0
Comment
Question by:Lillan061397
[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
  • 2
3 Comments
 

Accepted Solution

by:
GGR earned 50 total points
ID: 1338128
I'm not sure this is what your wanting, but try this:

aByte := StrToIntDef('123', 0);
{.. Send the Byte ..}

Where aByte = aByte:Byte;
and '123' is the string you want converted to a byte.

I have only tested this in Delphi 3.0 I'm not at my D2 Machine.
0
 

Author Comment

by:Lillan061397
ID: 1338129
I want aByte to have the value 123. 123 is an integer and not a string. It's very important that the value is correct.

Thanks!
0
 

Author Comment

by:Lillan061397
ID: 1338130
It works!!! Thanks! The ASCII tabel I first had was wrong, so I thought that it didn't work.

Linda.
0

Featured Post

Want Experts Exchange at your fingertips?

With Experts Exchange’s latest app release, you can now experience our most recent features, updates, and the same community interface while on-the-go. Download our latest app release at the Android or Apple stores today!

Question has a verified solution.

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

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses
Course of the Month10 days, 13 hours left to enroll

632 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