473,732 Members | 2,146 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3577
On Wed, 26 Oct 2005 20:33:33 -0400, "David" <pd***@comcast. net>
declaimed the following in comp.lang.pytho n:
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.netc om.com | Wulfraed Dennis Lee Bieber KD6MOG <
wu******@dm.net | Bestiaria Support Staff <
=============== =============== =============== =============== == <
Home Page: <http://www.dm.net/~wulfraed/> <
Overflow Page: <http://wlfraed.home.ne tcom.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*********@com cast.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
5478
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 -------------------------------------------------------------------------------- Hello, I have a very simple problem but cannot seem to figure it out. I have a very simple php script that sends a test email to myself. When I debug it in PHP designer, it works with no problems, I get the test email. If
9
8439
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 port ie to send data and to read the state of the parallel port including the control lines. Can anyone help/point me in the correct direction? I have tried the help files and the internet but am unable to find anything relevant. Thanks in...
3
4434
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 is that when I recognize FD_ISSET from stdin, I am stuck there. The loop does not return me to select() between stdin and listening socket. Similarly, when I accept a client, the loop does not return me to select between stdin and listeing...
6
2563
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 printing would have to bypass the printer driver.. i have read several article on sending file directly to a printer, but i could not understand how could i get the printername from the ports(especially when there is no driver install)? Can anyone...
11
5279
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 the port. eg. 00000001 will set pin 1 high and flick the relay open. todate i've attempted this with merely open() on /dev/ppi0 and numpy for the byte array, but i just can't seem to get it working. i know the parallel port works and i know the...
4
3285
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
4456
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 idea how to work on it. Please give some tips,The comamnd to be sent to the printer is hex data "1B 40".please give a example,it will be grateful.
4
15351
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 using PyParallel, but the USB->Parallel converter doesn't actually map to the LPT port .. and PyParallel only looks for LPT ports? Has anyone tried doing this? What are my options for controlling parallel connections on a laptop with no parallel...
1
2892
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 of seconds. I'm able to write and read from the parallel port, but after a few reads and writes it crashes... how many reads and writes before it crashes is not always the same.. sometimes it crashes at the first write or read.. other times it...
0
8944
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8773
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9306
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9234
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8186
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6030
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4805
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3259
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2721
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.