MsComm Control

Status
Not open for further replies.

cwt

New Member
Hi out there..
I have encounter some problem when dealing with MsComm Control.

Let say, i want to sent out &H11 (hex), which is 00010001 binary, how am i going to send that outwards through serial port?

I am using 8LEDs to test the out coming bytes. If the circuit encounter 00010001, it will light up accordingly.

The problem is, if i declare the hex data to the MsComm, there will be an error. So how am i going to declare the hex data and make sure that the receive bytes are correct?
Please help.

 

It will vary according to the language you use, but you need to send the ASCII character representing the number you need - something like Chr$(17) for the value you specified.
 
yes, mscomm excepects a string as input to be sent. so you need to convert your number to ascii
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…