Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2003-12-11
5
Medium Priority
?
750 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
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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

927 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