How to use the outp(...) command

T

Todd Gardner

I think all I have to do is figure out how to use the outp(...)
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
 
T

Terry Reedy

Todd Gardner said:
I think all I have to do is figure out how to use the outp(...)
command.

Python itself does not have such a command. Is there something in standard
lib?
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.

Python itself is, generally, unaware of 'memory addresses'.
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.

Perhaps giveio... and pyparallel... (which I don't remember any clp mention
of before today) have outp() and one of the docs will tell you more about
how to use it.

TJR
 
T

Todd Gardner

Terry Reedy said:
Python itself does not have such a command. Is there something in standard
lib?
See the following module. I believe there is an outp() command like
in C if you use this module.

From: Gandalf ([email protected])
Subject: Re: Writing to the parallel port (Mem 0x378) when runnning
WinXP or
*************************************************
http://pyserial.sourceforge.net/pyparallel.html *************************************************


Python itself is, generally, unaware of 'memory addresses'.


Perhaps giveio... and pyparallel... (which I don't remember any clp mention
of before today) have outp() and one of the docs will tell you more about
how to use it.

TJR
I have not yet found docs that tell me how to use the functions
however, I am still betting the modules have them.

Todd
 
T

Todd Gardner

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top