help with sending data out the parallel port

D

David

I'm wondering if python is capable of fairly precise timing and also sending
data out the parallel port.

For example ; making a 7.5 KHz square wave come out of one of the data pins
on the printer port.

I've tried to help myself with this one but searching in the "Python Library
Reference" that installed with my version, [ Python 2.4.1. ] yielded
nothing on the subject of either timing or parallel port.

Id be thankful for any help.

David KG2LI
 
D

Dennis Lee Bieber

I'm wondering if python is capable of fairly precise timing and also sending
data out the parallel port.
If you are on Windows, you have two things to worry about:

1) The NT family doesn't give direct access to the port without
first installing some special driver program -- and you probably need
that as regular sending of data to the port will likely hang from a lack
of handshaking.

2) Windows itself may get in your way. I don't remember the exact
speed I was working with but 1KHz seems to stick in mind. My assignment
was to output data (faking three parallel RS-422 <?> signals using 6
bits of the output byte) synchronized to an external clock (which was
read on a control pin of the parallel port). I could send about 196-254
bit transitions before the OS would do something that would cause me to
miss a few clock transitions. This, on an application written in VC++6,
on W98 (to get unrestricted access to the port). The application was
running with its priority set to the highest available.
--
 
P

Peter Hansen

David said:
I'm wondering if python is capable of fairly precise timing and also sending
data out the parallel port.

For example ; making a 7.5 KHz square wave come out of one of the data pins
on the printer port.

I've tried to help myself with this one but searching in the "Python Library
Reference" that installed with my version, [ Python 2.4.1. ] yielded
nothing on the subject of either timing or parallel port.

What are you trying to use this for? What kind of jitter does your
specification allow? (That is, since you can't get the edge transitions
exactly 66.6 microseconds apart all the time, how much variation are you
able to handle?) What will happen if, say, once every five or ten
seconds the OS hiccups and prevents your task from running for a full
second?

Doing this kind of high-speed realtime control on a non-realtime
operating system is generally difficult or impossible, but it does
depend on how precise you need to be, and how "soft" your realtime
requirements are. My gut feeling is that you cannot achieve what you
want using Python on Windows (or Linux!), but it depends on your needs,
not my gut. :)

-Peter
 
S

sp1d3rx

You don't want to use Python for that task. You're much better off
using the Microsoft DDK (driver development kit).
 
J

john_walczak

I may have a solution to your problem that involves a small piece o
hardware plugged into the serial port
contact me if interested in details
(e-mail address removed)

Sent via Archivaty.com
 

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,995
Messages
2,570,230
Members
46,817
Latest member
DicWeils

Latest Threads

Top