Solved

Serial Port Timer

Posted on 1997-11-30
2
237 Views
Last Modified: 2010-04-04
I need to test for closure between two pins on Com2 and set a timer between the 'clicks'.  The timer is easy enough, but I don't know how to test for input from the serial port. I am currently using an old DOS program to do this with pins 2 and 5.
0
Comment
Question by:emcdaniel
[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
2 Comments
 
LVL 8

Expert Comment

by:ZifNab
ID: 1352436
Input from commport or only from pin 2 and 5?

Like always, a lot of compenents are already on the net for input from a commport. And a lot are good ones. The one I use and I find it very good, calls TCommPortDriver. You can find it on Torry's delphi pages. It's freeware.

Have fun,
c.u. ZifNab;
0
 
LVL 3

Accepted Solution

by:
altena earned 100 total points
ID: 1352437
Look up the "WaitCommEvent" functio in the Win32 API.

You should span 1 thread to monitor the Comm port.
Waitcommevent will allow you to time anything you want to time.

Good Luck.
0

Featured Post

Industry Leaders: 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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

696 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