Re: Parallel port and Visual Basic?



On Sat, 09 Apr 2005 15:36:12 GMT, "Zucker" <zuckuss@xxxxxxxxxxx>
wrote:

>I am in the process of building a circuit that will monitor the start and
>finish times for pine box derby cars. I would like to be able to catch these
>events by feeding signals, through the parallel port, to a Visual Basic
>program. I was thinking of using the eight data pins from the parallel port
>to monitor eight lanes.
>
>The electronics are good to go. My problem is with Visual Basic.
>
>Does anyone know how to access and capture bit patterns from the parallel
>port using Visual Basic?
>
>Steve
>
>PS...I have asked this same question in several programming newsgroups, but
>I have not recieved any responses.
>
>
In addition to what others have said, note that the default port
configuration only has 5 input lines, one of which is inverted,
and they are on the Status port. If you want to read 8 inputs
at once on the Data port (which defaults to output-only), you'll need
to set a bidirectional mode. Alternatively, you could use 2 reads, of
the Status and Control ports, and get perhaps as many as 10 lines
with some bit-fiddling.

I agree that Windows is unlikely to work for this, unless you are
handy with Ring 0 driver development. I'd use real-mode DOS
(*not* a "DOS prompt" from Windows), which requires Win9x or
earlier. You will be able to get response times in the 10 microsecond
range. You will have to read the port(s) in a tight loop if you
want to get individual times, although if you just want to find the
winner you could OR all lines together to trigger an interrupt
(the printer interrupt, typically IRQ 7) when the first one crosses,
and then read the port to figure out which one it was.

You might be able to do this as a TSR, probably in assembly,
and have it post the results somewhere that your Basic code
could read it at its own pace. But you can't install TSRs under
Windows, so that leaves out Visual Basic. Sorry! Might
want to look into old QuickBasic for DOS.

Best regards,




Bob Masta
dqatechATdaqartaDOTcom

D A Q A R T A
Data AcQuisition And Real-Time Analysis
www.daqarta.com
.



Relevant Pages

  • Serial Com Port Monitor 4.0
    ... Serial Com Port Monitor displays, logs and analyzes all serial data ... exchange between serial devices and any application. ...
    (comp.software.shareware.announce)
  • Re: [Full-disclosure] .NET REMOTING on port 31337
    ... Monitor traffic. ... I have found a service running on a Win2k3 server that the admin wanted me ... an IPv4 to IPv4 port mapping, so windows remote desktop admin could be ... [Full-disclosure] .NET REMOTING on port 31337 ...
    (Full-Disclosure)
  • Re: HELP: BIG "Display" PROBLEM
    ... if the problem rests with the monitor. ... once I get into the desktop the display is ... Failing that I will get a new video card. ... I could not find another port that looked the same as the one ...
    (microsoft.public.windowsxp.general)
  • Re: Cant send movies to TV from S-video on Inspiron
    ... Can't comment on your particular card, but I've had both ATI and nVidia ... My computer was connected to a monitor, and I decided that I would also ... How do I get the S-video port to send something Windows ...
    (alt.sys.pc-clone.dell)
  • Re: Configuring port monitor UI DLL programmatically?
    ... the port names have to be unique within the system. ... the way to link the Monitor UI DLL to the rest should also be ... thanks for the solution to the UI DLL linkage. ... >>Bobby Mattappally ...
    (microsoft.public.development.device.drivers)