|
-
Nov 1st, 1999, 05:17 AM
#1
Thread Starter
New Member
We are developing an application using serial port pins as inputs from switches. We are watching the carrier-detect pin with CommEvent to detect a switch open or close. The problem: can't seem to reset it without shutting off the application and restarting. Is there any way to reset the CommEvent settings during runtime?
-
Nov 1st, 1999, 08:36 AM
#2
Addicted Member
Sure, just close the port and reopen it. As long as the settings (DTREnable, etc..) haven't changed, you should be able to just close and open again for a reinitialization.
HTH,
Phil
-
Nov 1st, 1999, 09:46 AM
#3
Hyperactive Member
Why bother with serial port? Parallel port is much easier to work with, and you have at least 5 inputs (13 in bidirectional ports)
-
Nov 1st, 1999, 10:30 AM
#4
Addicted Member
Parallel Port programming in VisualB can be a pain in the arse and really has more disadvantages than advantages. Because messages aren't sent by Windows on STROBE or other printer signals, you don't have an easy way to trigger your software on Recieve, etc. You can program events to monitor the STROBE pin, but doing this causes more CPU "polling". Since Windows already provides serial messages, Visual Basic makes use of these messages and provides the programmer an easy clean way with the OnComm Event.
Hell, the parallel port is soon to be dead anyway. USB is much faster, has more device capactity, and is as easy to program. The better question would be - "Why bother with parallel port?"
Phil
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|