Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to declare hex data to the MsComm & check received b

Status
Not open for further replies.

cwt

Member level 5
Member level 5
Joined
May 26, 2004
Messages
80
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Activity points
918
MsComm Control

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. :cry:
 

Re: MsComm Control

Try using the Chr() function,

ex.
I want to send 0x11 = d 17:
I write "MsComm1.Output = Chr(17)"

If it works you can easily create a function that converts hex to dec.

bye wn.
 

MsComm Control

Is there any method left?
Because..i already create the database in hex.
And that database is very long..
 

MsComm Control

Its ok..i have finish the convertion..phew~damn tired..haha..thanks!
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top