471,351 Members | 1,562 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,351 software developers and data experts.

Writing to the parallel port (Mem 0x378) when runnning WinXP or Mandrake 9.2

---------------------------------------------------------------
I would appreciate any ideas how to write to the parallel port (Mem
0x378) when runnning WinXP or Mandrake 9.2.

In C and LabVIEW I use the OutP command to write to directly to a
memory address.

Thank you
--
Todd
pi**@earthlink.net
---------------------------------------------------------------
Jul 18 '05 #1
11 6235
Todd Gardner wrote:
I would appreciate any ideas how to write to the parallel port
(Mem 0x378) when runnning WinXP or Mandrake 9.2.

In C and LabVIEW I use the OutP command to write to
directly to a memory address.


I don't know about Linux, but in Windows NT/2000/XP you need a kernel mode device driver.

This Google search may help:

windows xp parallel port i/o driver

-Mike
Jul 18 '05 #2
Use PySerial

http://pyserial.sourceforge.net/

Laci

Todd Gardner wrote:
---------------------------------------------------------------
I would appreciate any ideas how to write to the parallel port (Mem
0x378) when runnning WinXP or Mandrake 9.2.

In C and LabVIEW I use the OutP command to write to directly to a
memory address.

Thank you
--
Todd
pi**@earthlink.net
---------------------------------------------------------------


Jul 18 '05 #3
Gandalf wrote:
Use PySerial

http://pyserial.sourceforge.net/


I'd recommend PyParallel instead:

http://pyserial.sourceforge.net/pyparallel.html

;)

-- Gerhard
Jul 18 '05 #4
:-) Oh yeah.

I'm sorry.

Gerhard Ha"ring wrote:
Gandalf wrote:
Use PySerial

http://pyserial.sourceforge.net/

I'd recommend PyParallel instead:

http://pyserial.sourceforge.net/pyparallel.html

;)



Jul 18 '05 #5
Gandalf <ga*****@geochemsource.com> wrote in
news:ma**************************************@pyth on.org:
Use PySerial

http://pyserial.sourceforge.net/
thanks for recomending it :-) as a little clarification:
the link to pyparallel is here:
http://pyserial.sourceforge.net/pyparallel.html

(its only a small note on the mainpage)

currently i have only py2.2 versions available for download, but i can
easily build the 2.3 version upon request, or you can build it on your own
with mingw32 or cygwin installed: python setup.py build --compiler=mingw32
install

you will need giveio.sys, also available in the downloads section, that
allows programs to access the io ports on Win NT/2k/XP

chris
Laci

Todd Gardner wrote:
---------------------------------------------------------------
I would appreciate any ideas how to write to the parallel port (Mem
0x378) when runnning WinXP or Mandrake 9.2.

In C and LabVIEW I use the OutP command to write to directly to a
memory address.

Thank you
--
Todd
pi**@earthlink.net
---------------------------------------------------------------


--
Chris <cl******@gmx.net>

Jul 18 '05 #6
Dennis Lee Bieber wrote:

W98 system. It works, but I've not been able to track down and prevent
some OS preemption problem that occurs between 200 and 250 milliseconds
into a stream of output data. This is with the process upped to
REALTIME class, and the port "driver" thread upped to TIME_CRITICAL (a
combination that should have the thread running at priority 31!)


Win98 is not a realtime OS, and it's unlikely you'll ever be able
to fix this sort of thing completely. There are no guarantees whatsoever
that your code, even at so-called "REALTIME" level, will have any particular
latency.

If you really need that kind of critical timing, you should use
another OS.

-Peter
Jul 18 '05 #7
Peter Hansen fed this fish to the penguins on Saturday 06 December 2003
05:49 am:

If you really need that kind of critical timing, you should use
another OS.
Unfortunately the use of that antique (P-II, ~250MHz) laptop is
mandated -- government furnished equipment.

My current work-around is to use the high-performance counters at the
start to determine the clock rate I'm seeing, then compute how many
"segments" of data I can send in <200msec (since I've never seen the
problem appear earlier than that). I then pop up an annoying message
box that the user must "continue/cancel" between every /n/ segments
(one of the three lines is an IDLE indicator, and the port will hold
that through the interim). My current hopes are that the user
interaction will "reset" whatever in the OS sucked up the time.

-- ================================================== ============ <
wl*****@ix.netcom.com | Wulfraed Dennis Lee Bieber KD6MOG <
wu******@dm.net | Bestiaria Support Staff <
================================================== ============ <
Bestiaria Home Page: http://www.beastie.dm.net/ <
Home Page: http://www.dm.net/~wulfraed/ <


Jul 18 '05 #8
Chris Liechti <cl******@gmx.net> wrote in message news:<Xn***************************@62.2.16.4>...
Gandalf <ga*****@geochemsource.com> wrote in
news:ma**************************************@pyth on.org:
Use PySerial

http://pyserial.sourceforge.net/
thanks for recomending it :-) as a little clarification:
the link to pyparallel is here:
http://pyserial.sourceforge.net/pyparallel.html

(its only a small note on the mainpage)

currently i have only py2.2 versions available for download, but i can
easily build the 2.3 version upon request, or you can build it on your own
with mingw32 or cygwin installed: python setup.py build --compiler=mingw32
install

you will need giveio.sys, also available in the downloads section, that
allows programs to access the io ports on Win NT/2k/XP

chris

I think all I have to do is figure out how to use the outp(...)
command. Pardon my ignorance here but how do I figure out the syntax
of this command?

This is my first project in python and it seems a bit daunting. I am
trying to communicate to a custom device via the parallel port. At
this point I only want to write data to the data port. In my case the
memory address is x378.

I installed: Python 2.2, giveio_setup.exe and
pyparallel-0.1.win32-py2.2.exe. I was running Python2.3 but I don't
think that it will matter for this newbie project.

Many thanks for all of your pointers!

Todd
Laci

Todd Gardner wrote:
---------------------------------------------------------------
I would appreciate any ideas how to write to the parallel port (Mem
0x378) when runnning WinXP or Mandrake 9.2.

In C and LabVIEW I use the OutP command to write to directly to a
memory address.

Thank you
--
Todd
pi**@earthlink.net
---------------------------------------------------------------

Jul 18 '05 #9
Chris Liechti <cl******@gmx.net> wrote in message news:<Xn***************************@62.2.16.4>...
Gandalf <ga*****@geochemsource.com> wrote in
news:ma**************************************@pyth on.org:
Use PySerial

http://pyserial.sourceforge.net/
thanks for recomending it :-) as a little clarification:
the link to pyparallel is here:
http://pyserial.sourceforge.net/pyparallel.html

(its only a small note on the mainpage)

currently i have only py2.2 versions available for download, but i can
easily build the 2.3 version upon request,


I would like to request that you build a 2.3 version.
or you can build it on your own with mingw32 or cygwin installed: python
setup.py build --compiler=mingw32
install
I am quite the newbie so I would not even attempt to build it on my
own yet, soon maybe but...
you will need giveio.sys, also available in the downloads section, that
allows programs to access the io ports on Win NT/2k/XP

chris


Thanks,

Todd
Jul 18 '05 #10
IT WORKS with version 2.2. ! Thank you Chris! I am not sure how I
can use version 2.3.

The code that I need to try it out was this... And I found it of all
places, in the docs... go figure :)
**************************************
import parallel
p = parallel.Parallel() #open LPT1
p.setData(0x55)
**************************************

Thank you,

Todd
Jul 18 '05 #11
pi**@earthlink.net (Todd Gardner) wrote in
news:9b*************************@posting.google.co m:
Chris Liechti <cl******@gmx.net> wrote in message
news:<Xn***************************@62.2.16.4>...

[pyparallel]
currently i have only py2.2 versions available for download, but i
can easily build the 2.3 version upon request,


I would like to request that you build a 2.3 version.


at your wish (one line):
https://sourceforge.net/project/show...release_id=147
361

(thats the download section of pyserial.sf.net)

chris
--
Chris <cl******@gmx.net>

Jul 18 '05 #12

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Eric | last post: by
1 post views Thread by Eric | last post: by
12 posts views Thread by david.brown.0 | last post: by
3 posts views Thread by nik | last post: by
23 posts views Thread by Marco | last post: by
2 posts views Thread by chinnari | last post: by
3 posts views Thread by Fa6om | last post: by
reply views Thread by XIAOLAOHU | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.