?
Solved

How to detect binary signal from serial port using VB 6???

Posted on 2003-12-11
5
Medium Priority
?
749 Views
Last Modified: 2010-05-03
I’m doing a project to convert morse code (binary signal) to character using Visual Basic 6 in window XP. How can I input the binary signal to the computer using serial port? The program only needs to detect signal condition (1 or 0) on one pin of the serial port. Can anyone help me please?
0
Comment
Question by:ngwenpin
[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
5 Comments
 
LVL 13

Expert Comment

by:crazyman
ID: 9921252
Use the Microsoft COMM Control.
The event you want is MSComm1_OnComm
0
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 540 total points
ID: 9921495
I don't think the serial port would be the best choice.  It is designed to send signals as pulses and so you can't really hold a particular pin high or low.  It may pulse fast enough to be seen as a high however.

The parallel port can be used to hold a pin high or low.

There is another open thread dealing with the same thing here:
http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20816365.html

Idle_Mind
0
 
LVL 1

Expert Comment

by:awabid
ID: 9922395
Well pal,
there is ofcourse a way out to detect this on the serial port, and MS COMM CONTROL is used to access the COM port. All you have to do is to open the port on 9600 baud with 8,N,1,No parity. But you have to design a hardware as well for this. This hardware will be consisting on a chip which is used to interface the input in RS232 format. This is pretty cheap chip. It is of MAXIM company and the number of the chip is MAX232. You can download its datasheet from    . Now all you have to do is to design a circuit, which can hold the input for a baud of 9600. Then put an OR/AND gate. Design a logic which can change the state of 1111 1111 to some other state, and using MS COMM CONTROL keep detecting the signal. Then compare with a known pattern. If the pattern changes (remember that the input will be some ascii value, which u will get) then you can use some switching statement to see what was the input.
Happy programming and development :)
A W Abid
0
 
LVL 27

Expert Comment

by:planocz
ID: 10270521
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
No response from ngwenpin from 12/11/2003 comment
Award points to Idle_Mind is recommend.
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

planocz
EE Cleanup Volunteer
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

718 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