parallel port input

Brandon Cernicky brandon_cernicky at yahoo.com
Thu Oct 21 15:06:01 UTC 2004


Yes, unfortunately each BIOS vendor will call the
parallel port modes something different.  Typically
they will follow these names:

1) AT, Output Only, SPP

2) PS/2, Bi-Directional

3) EPP

4) ECP

In modes #1, E-Prime can write 8 bits to the data port
and up to 5 bits from the status port.  With some
script, E-Prime can configure a EPP/ECP port, which
are available on just about any machine made in the
last five years to allow reading or writing 8 bits on
the Data port.  (Those routines available from PST
tech support)

Since the newer ports have come available, the names
of the modes and how they act have also changed.
Thus, it may require some trial and error to get the
best solution.  What makes matters worse is that some
vendors do not follow the IEEE guidelines for the
parallel port modes.  For example, newer Dell
computers do not meet the current guidelines needed
for some of the parallel port modes and cause
connecting external devices including the PST hardware
key to fail.  (Please note I feel Dell provides
excellent computers besides this small flaw)

In summary, each machine may require some tweaking to
get the results you desire.  Unless you require
simultaneous reading and writing from the port,
athough it does require obtaining some script from
PST, I would consider contacting them to get the
routines that would allow you to configure a ECP/EPP
port to work in Bi-Directional mode.  This (in theory)
would allow for a more portable solution across
machines provided they have the newer ECP/EPP
capabilities.


-Brandon


--- Leh Woon Mok <mokx0002 at umn.edu> wrote:

> Brandon,
>
> Thanks much for the clarification.
>
> After trying out more systematically across
> computers, I have discovered
> that the parallel port device on EPrime seems to
> work properly (i.e., being
> able to read from all 5 input pins) only when the
> computer supports the
> newer SPP mode but not when the computer is only to
> support the older AT
> mode.
>
> Under the AT mode, only 2 pins can be read and when
> the device is connected
> through the parallel port key, three pins can be
> read but the fourth pin
> consistently cannot be read.
>
> May I verify my findings with you that it is an
> issue of whether it's the
> AT or the SPP mode?
>
> In addition, there seems to be an interaction with
> DELL computers.  Across
> DELL computers that support either the AT or SPP
> mode, the parallel port
> device consistently does not work well with EPrime,
> i.e., only 2 pins can
> be read.  Under the SPP mode with other computer
> brands, the parallel port
> device consistently works fine.
>
> Hope to hear from you again.
>
> Thanks,
> Leh Woon
>
> At 12:47 PM 10/5/2004 -0700, Brandon Cernicky wrote:
> >Leh,
> >
> >By default, E-Prime is directed to work best when a
> >parallel port is in standard mode (also known as AT
> or
> >Output only).  This allows for 8 output bits on the
> >DATA register (pins 2-9) and 5 input bits on the
> >STATUS register (pins 10-13, 15).
> >
> >First, make sure that the external device is
> >connecting to one of the ground pins (18-25) and
> that
> >the device is using a true TTL signal to set the
> 1/0
> >states.
> >
> >It is possible that on the machines where you are
> >having trouble, the parallel port mode is
> configured
> >for the newer Bi-Directional, ECP, or EPP modes
> where
> >the pins control different behaviors.  You can
> >determine what the parallel port mode is and
> configure
> >it through the system BIOS.
> >
> >Although the parallel port hardware key is designed
> to
> >be a pass-through device, you may find difficulty
> in
> >getting communications to work when connecting
> devices
> >to the hardware key.  I would encourage you to
> >temporarily not use the parallel key while
> debugging
> >to ensure proper communications.  PST does offer a
> USB
> >version of the hardware key.
> >
> >If you continue to have troubles, you may want to
> >contact PST web support and ask them for a set of
> >script routines they have that can configure the
> >parallel port to work in Bi-Directional mode, which
> >would allow you to read and write to the DATA
> register
> >and have all eight bits of input and output (but
> not
> >at the exact same time of course).  Going through
> the
> >DATA register also allows for no bits being
> inverted.
> >The pre-canned script does all of the technical
> work
> >and all that is needed in the experiment is an
> InLine
> >with "ConfigurePortForRead" call to setup the port.
> >
> >-Brandon
> >
> >~~~~~~~~~~~~~~~~~~~~~~~~
> >Brandon S. Cernicky
> >Senior Software Engineer
> >Psychology Software Tools
> >
> > > Hi all,
> > >
> > > I'm trying to collect input from an external
> device
> >connected through the
> > > parallel port via pins 15, 13, 12 and 10.
> > >
> > > I have defined my port device as below:
> > > address: 889
> > > size: 8
> > > invert: No
> > > mask: -1
> > >
> > > This worked on some computers but on some
> computers,
> >I can only read from
> > > pins 15 and 10 which gave me the hexadecimal
> outputs
> >of 4 and 7, respectively.
> > >
> > > Strangely enough, on those computers that can
> only
> >read from pins 15 and
> > > 10, when the parallel port device is connected
> >through the EPrime parallel
> > > key (for single licenses), pin 12 worked as
> well,
> >but I still can't read
> > > from pin 13.
> > >
> > > I hope someone could provide me with some
> insights
> >as to what is happening.
> > >
> > > Thanks much!
> > >
> > > Regards,
> > > Leh Woon
> >
> >
> >
> >
> >_______________________________
> >Do you Yahoo!?
> >Declare Yourself - Register online to vote today!
> >http://vote.yahoo.com
>
>



		
_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com



More information about the Eprime mailing list