Solved

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

Posted on 2003-12-11
5
746 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 135 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

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

Suggested Solutions

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

752 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