No subject

Anthony Zuccolotto Tony.Zuccolotto at pstnet.com
Tue Apr 25 13:18:01 UTC 2000


Hi Ted,

I have recently run into the same problem and it turned out to the be
parallel port mode that was set in the system's BIOS.  The parallel port has
evolved over time and many manufacturers have been taking advantage of the
more efficient operation modes by default rather than by choice of the end
user.  This is generally good for printing, but appears to be bad for using
the parallel port as a built-in digital I/O device.

To check the mode of your parallel port reboot your machine and go into the
BIOS setup for your machine (it's usually the F1 or DEL key during boot).
Go to the peripheral configuration section of the BIOS settings and look for
the Parallel Port.  Bring up the menu for configuration/mode options, e.g.
some common settings are "standard/output only", "bi-directional", "EPP",
and a few others, but the exact terms may vary from BIOS to BIOS.   Switch
the mode to "standard/output only".  While you're in there you should also
check to make sure &H378 is actually the base port address that is listed,
e.g. some machines use &H3BC instead and if that is the case you should
change the address in your experiment.

This should get you the signal you are seeking, but keep in mind that your
ReadPort/WritePort requests are still going through the LPT.VXD driver
rather than directly to the hardware.  This overhead is typically
sub-millisecond from the informal tests I have run, but if your results are
not as expected you may want to skip the parallel port and use a simple
digital I/O card if all you need is a few bits.  Since the card is not a
parallel or serial adaptor Windows will pretty much stay out of your way and
you should have no driver interference.

If you want to follow this option check out www.bsof.com for some "cheap but
effective" digital I/O cards.  It sounds like the DIG100/24 digital I/O card
($39) with a PIB100 - DB25 Passive Interface Board ($15) would do the trick.
You should note that the boards are not well isolated so don't make a habit
of connecting/disconnecting the cable while the machine is booted.  If you
want isolation check out the ISO105 Opto-Isolated 24 Line D/I Interface
Board as an add-on.

The only difference programmatically between one of the DIG cards and the
parallel port is using a different base address (typically &H200) and one
extra WritePort call at the beginning of the experiment to configure the
ports of the card as input or output (the documentation demonstrates how to
do this).

Hope that helps,
Tony

All information provided and all opinions expressed are my own and do not
necessary reflect the views, policies, or positions of my employer.

Anthony P. Zuccolotto
Sr. Software Engineer
Psychology Software Tools, Inc.
2050 Ardmore Blvd. Suite 200
Pittsburgh, PA 15221
http://www.pstnet.com


-----Original Message-----
From: Theodore Steger [mailto:theosteger at di.mdacc.tmc.edu]
Sent: Monday, April 24, 2000 1:27 PM
To: eprime at step.psy.cmu.edu
Subject:





Hello all.

I'm trying to use the parallel port to send a trigger pulse to start an MR
scanner.  I've been using the WritePort command but when I
put a meter to the parallel port pins, I get no output.  The command I'm
using
is

WritePort &H378, 1

Any suggestions you may have will be appreciated.  Thank you.

Ted Steger



More information about the Eprime mailing list