473,405 Members | 2,167 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 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 6384
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: guenais | last post by:
Hello When I use Pyparallel to access the parallel port in WinXP with Python I get an error saying that this is a priviledged instruction Any clue ? Mike
0
by: Eric | last post by:
I want to write to parallel port to drive a device. In the code, I use run time library function _outp() to write to the pin D0 as following: _outp(0x378, 0x01); I got an exception:...
1
by: Eric | last post by:
I want to write to parallel port to drive a device. In the code, I use run time library function _outp() to write to D0 as following: _outp(0x378, 0x01); I got an exception: "privileged...
12
by: david.brown.0 | last post by:
I'm trying to make a Java program access a parallel port. Java's comm API does not provide me with the control I need. I need to be able to write to the data and control pins and read the status...
3
by: nik | last post by:
hello frinds, last night i am using C prog to get output at my parallel port the following source code is #include<dos.h> #include<conio.h> #include<process.h> void main() { outportb(...
23
by: Marco | last post by:
Could anyone please tell me why the program has the following error? I copy the program from http://www.beyondlogic.org/parlcd/parlcd.htm ...
2
by: chinnari | last post by:
i need to send data to parallel port from an electronic circuit .. i must use LPT1(0x378-0x37F) . i am using EPP mode .please send me the required program in 'C'
3
by: Fa6om | last post by:
Hi all I need to write a program in C that reads 4 switches from the parallel port and display their status. All the program does is display: switch 1 is ON switch 2 is OFF switch 3 ... The...
1
by: ssndk123 | last post by:
Hi, Using the UserPort program that changes permissions in XP so that I am able to write directly to the parallel port using assembler.. I'm trying to send out square wave pulses for x number...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.