Solved

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

Posted on 2003-12-11
5
743 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
5 Comments
 
LVL 13

Expert Comment

by:crazyman
Comment Utility
Use the Microsoft COMM Control.
The event you want is MSComm1_OnComm
0
 
LVL 85

Accepted Solution

by:
Mike Tomlinson earned 135 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

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…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

763 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now