473,323 Members | 1,550 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,323 software developers and data experts.

help with sending data out the parallel port

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
Oct 27 '05 #1
4 3545
On Wed, 26 Oct 2005 20:33:33 -0400, "David" <pd***@comcast.net>
declaimed the following in comp.lang.python:
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.
-- ================================================== ============ <
wl*****@ix.netcom.com | Wulfraed Dennis Lee Bieber KD6MOG <
wu******@dm.net | Bestiaria Support Staff <
================================================== ============ <
Home Page: <http://www.dm.net/~wulfraed/> <
Overflow Page: <http://wlfraed.home.netcom.com/> <

Oct 27 '05 #2
David wrote:
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
Oct 27 '05 #3
You don't want to use Python for that task. You're much better off
using the Microsoft DDK (driver development kit).

Oct 27 '05 #4
I may have a solution to your problem that involves a small piece of
hardware plugged into the serial port.
contact me if interested in details.
jo*********@comcast.net
Sent via Archivaty.com
Nov 5 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
9
by: MNQ | last post by:
Hi All I want to use my parallel port of my PC to control some external devices. I am writing a program in ANSI C using the PacificC compiler. What I need to know is how to access the parallel...
3
by: Marcia Hon | last post by:
Hi, I am trying to use the select() socket programming command to select between stdin and a connection. Currently, I have a listening stream and stdin that I insert into the fd_set. The problem...
6
by: notregister | last post by:
hi, i have been trying to send a printer-ready data to an unknown printer to print. the reason why the printer is unknown is that i do no wish installed any printer driver. so at the end my...
11
by: Timothy Smith | last post by:
hello people. i've been trying to send an 8 byte string to my parallel port under freebsd. the purpose is it to control a relay board. the board simply responds to the output byte coming from...
4
by: Hector M Banda | last post by:
Hi all, How can I send chr(7) thru VB2005 using the parallel port? BTW This is for a POS system. Thanks, -hb
2
by: hari | last post by:
Hi all, I need to automate printer command testing, prinetr supports parallel/ serial/USB.How can i send the commands from python to printer. I have got pyparallel, as am new to python, no...
4
by: Soren | last post by:
Hi, I want to control some motors using the parallel port.. however, my laptop does not have any parallel ports (very few do). What I do have is a USB->Parallel converter... I thought about...
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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.