473,882 Members | 1,628 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to Read and Write on Parallel Port using C in Windows XP

Hello,

I want to create a small project which will display scrolling text on
LED that will be attached to Parallel port. I want to create this
project in C language(possib ly in Mingw) on Windows XP. I want to know
how can i access(read and write data) on parallel port in XP.

I have a program that do the same thing but in its documentation it
says that it will not work on Windows XP.

I want to create a GUI for this project in which we can enter the
desired Text to display on LED and Scrolling Speed.

Is this possible to create this Project in C?

Feb 23 '07 #1
6 9331
On Feb 23, 3:10 pm, "abhi" <abhina...@gmai l.comwrote:
Hello,

I want to create a small project which will display scrolling text on
LED that will be attached to Parallel port. I want to create this
project in C language(possib ly in Mingw) on Windows XP. I want to know
how can i access(read and write data) on parallel port in XP.
You'll probably get a poor response here. This group concentrates on
the C programming language in general, not how it can do something
with a specific platform (hardware, O/S).

Entering '"Windows XP" "Parallel Port" read write' (with the "
characters but not the ' characters) into Google seemed productive for
me.
I have a program that do the same thing but in its documentation it
says that it will not work on Windows XP.
Shame...
I want to create a GUI for this project in which we can enter the
desired Text to display on LED and Scrolling Speed.
Good luck. But don't ask about GUIs here...
Is this possible to create this Project in C?
Yes, but you'll need to do things beyond the standard "portable" C
that is discussed here.

Follow the pointers above to search via Google, and if you need more
help go to one of the Windows programming newsgroups, I'd suggest.

Feb 23 '07 #2

abhi wrote:
Hello,

I want to create a small project which will display scrolling text on
LED that will be attached to Parallel port. I want to create this
project in C language(possib ly in Mingw) on Windows XP. I want to know
how can i access(read and write data) on parallel port in XP.

I have a program that do the same thing but in its documentation it
says that it will not work on Windows XP.

I want to create a GUI for this project in which we can enter the
desired Text to display on LED and Scrolling Speed.

Is this possible to create this Project in C?
The answer to your question would involve using numerous Windows
specific functions, particularly for the GUI. Please post to
comp.os.ms-windows.program mer.win32.

Feb 23 '07 #3
abhi a écrit :
Hello,

I want to create a small project which will display scrolling text on
LED that will be attached to Parallel port. I want to create this
project in C language(possib ly in Mingw) on Windows XP. I want to know
how can i access(read and write data) on parallel port in XP.

I have a program that do the same thing but in its documentation it
says that it will not work on Windows XP.

I want to create a GUI for this project in which we can enter the
desired Text to display on LED and Scrolling Speed.

Is this possible to create this Project in C?
http://www.beyondlogic.org/porttalk/porttalk.htm
Feb 23 '07 #4

"abhi" <ab*******@gmai l.comwrote in message
news:11******** *************@s 48g2000cws.goog legroups.com...
Hello,

I want to create a small project which will display scrolling text on
LED that will be attached to Parallel port. I want to create this
project in C language(possib ly in Mingw) on Windows XP. I want to know
how can i access(read and write data) on parallel port in XP.

I have a program that do the same thing but in its documentation it
says that it will not work on Windows XP.
Windows/XP stops user programs directly accessing the hardware as this can
be dangerous....
... for example if a program could intercept a print request then it could
cause output to be changed...
>
I want to create a GUI for this project in which we can enter the
desired Text to display on LED and Scrolling Speed.

Is this possible to create this Project in C?
Not in standard "C" which is the subject of this group. You will either have
to write a device driver, and for that you probably need Microsoft C, and
you certainly need the Platform SDK, or use a generic driver that provides
safe access to the printer port.
Either of these are platform specific, so you need a windows programming
group
Feb 24 '07 #5
Yes this is not a C question. It can be done using MinGw and the Windows
SDK using the CreateFile() function. For more on this you might try
microsoft.pulic .dotnet.languag e.vc - it is a little off-topic there to but
people there are not too hard nosed.

Regards
Chris Saunders

"David Wade" <g8***@yahoo.co mwrote in message
news:C6******** *************** *******@eclipse .net.uk...
>
"abhi" <ab*******@gmai l.comwrote in message
news:11******** *************@s 48g2000cws.goog legroups.com...
>Hello,

I want to create a small project which will display scrolling text on
LED that will be attached to Parallel port. I want to create this
project in C language(possib ly in Mingw) on Windows XP. I want to know
how can i access(read and write data) on parallel port in XP.

I have a program that do the same thing but in its documentation it
says that it will not work on Windows XP.

Windows/XP stops user programs directly accessing the hardware as this can
be dangerous....
.. for example if a program could intercept a print request then it could
cause output to be changed...
>>
I want to create a GUI for this project in which we can enter the
desired Text to display on LED and Scrolling Speed.

Is this possible to create this Project in C?

Not in standard "C" which is the subject of this group. You will either
have
to write a device driver, and for that you probably need Microsoft C, and
you certainly need the Platform SDK, or use a generic driver that provides
safe access to the printer port.
Either of these are platform specific, so you need a windows programming
group


Feb 25 '07 #6
Chris Saunders wrote: (*** and top-posted - fixed ***)
"David Wade" <g8***@yahoo.co mwrote in message
>"abhi" <ab*******@gmai l.comwrote in message
>>>
I want to create a small project which will display scrolling
text on LED that will be attached to Parallel port. I want to
create this project in C language(possib ly in Mingw) on Windows
XP. I want to know how can i access(read and write data) on
parallel port in XP.

I have a program that do the same thing but in its documentation
it says that it will not work on Windows XP.

Windows/XP stops user programs directly accessing the hardware
as this can be dangerous....
.. for example if a program could intercept a print request then
it could cause output to be changed...
>>I want to create a GUI for this project in which we can enter the
desired Text to display on LED and Scrolling Speed.

Is this possible to create this Project in C?

Not in standard "C" which is the subject of this group. You will
either have to write a device driver, and for that you probably
need Microsoft C, and you certainly need the Platform SDK, or use
a generic driver that provides safe access to the printer port.
Either of these are platform specific, so you need a windows
programming group

Yes this is not a C question. It can be done using MinGw and the
Windows SDK using the CreateFile() function. For more on this you
might try microsoft.pulic .dotnet.languag e.vc - it is a little
off-topic there to but people there are not too hard nosed.
Please do not top-post. Your answer belongs after, or possibly
intermixed with, the material which you quote, after snipping
irrelevancies. This has not been snipped in order to maintain the
overall meaning. See the following links:

--
Some informative links:
<http://www.catb.org/~esr/faqs/smart-questions.html>
<http://www.caliburn.nl/topposting.html >
<http://www.netmeister. org/news/learn2quote.htm l>
<http://cfaj.freeshell. org/google/ (taming google)
<http://members.fortune city.com/nnqweb/ (newusers)
Feb 25 '07 #7

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

Similar topics

4
7178
by: Jorge Godoy | last post by:
Hi! We're doing a research project that involves controlling mini-windtrap speeds and we're reading/writing data from the parallel port. What I've found so far on a fast Google search for "python parallel port" showed me some stuff that I'd have to interface with Python through SWIG. If the program could be portable in Windows and Linux it would be a big
4
3584
by: David | last post by:
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, yielded nothing on the subject of either timing or parallel port.
6
3281
by: Peter | last post by:
I'm interested to know what ideas are out there for reading a parallel port at a constant sample rate while still allowing the user to interact with the GUI. That is, reading it every 10ms for example without exception. Is this at all possible? Current tests done show that if the sample rate is 10ms then this is acheived in general, but when another program loads or terminates this 10ms jumps up to 100ms or more. In these tests the code is...
12
8642
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 pins. Any Java people know a good solution? I'm trying to use JNI and create my own library, but building the library gives me these errors: ld: warning: cannot find entry symbol _start; defaulting to 0000000008048094 ParallelPort.o: In...
11
5297
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...
0
565
by: abhi | last post by:
Hello, I want to create a small project which will display scrolling text on LED that will be attached to Parallel port. I want to create this project in C language(possibly in Mingw) on Windows XP. I want to know how can i access(read and write data) on parallel port in XP. I have a program that do the same thing but in its documentation it says that it will not work on Windows XP.
4
11837
by: rowan | last post by:
I'm writing a driver in Python for an old fashioned piece of serial equipment. Currently I'm using the USPP serial module. From what I can see all the serial modules seem to set the timeout when you open a serial port. This is not what I want to do. I need to change the timeout each time I do a "read" on the serial port, depending on which part of the protocol I've got to. Sometimes a return character is expected within half a second,...
3
2874
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 program is to run in linux kernel version 2.6 I started writing the program for one switch connected to the pin D0 of the parallel port, but i get a sigmentation failure message.
4
15376
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...
0
9931
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
11106
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10724
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...
0
10403
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9556
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...
1
7955
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5978
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4198
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3226
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.