Click here to Skip to main content
Click here to Skip to main content

Reading from Parallel Port using Inpout32.dll

By , 8 Aug 2006
 

Introduction

This is a good tutorial about interfacing with the parallel port; more inportantly reading from the port. Other articles I've seen only shown how to write to the port.

Before I get ahead of myself, the parallel port I used is an ECP (Extended Capability Port).  Find out if your port is the same as mine, yours could be an EPP or SPP. 

 

Go to “Control Panel / System /  Hardware Tab / Device Manager / Ports (Com & LPT) / Printer Port (LPT1 or LPT2) /”

 

It should indicate what type you have.  You can also go to the ‘Resource’ Tab to indicate the range of your port: mine is I/O Range 0378 – 037F, ignore the other I/O range.

 

For the ECP, there are some over headers if I was to use the data port as both input and output.  Instead, I used the signal port for data processing.

 

If by any odd reason you don't understand the tutorial.  Please refer to the explaination towards the bottom of the page.  Or just email me. 
 
Note that all information regarding the inpout.dll is on http://www.logix4u.net/  
 
>>Please Vote so I can get an indication weither it's worth my time to update.<<

 

 

Testing

 

As mention before, I used a DMM to test out the ports (nothing connected to the ports yet) and I used the read function from the inpout32.dll, .ie In(Port Address), my particular port address was:

 

Sample screenshot 

 

[Data Port]         Addres:  0x378H or in VB Express &H378S

[Status Port]      Addres:  0x379H or in VB Express &H379S

[Control Port]    Addres:  0x37AH or in VB Express &H37AS

 

   *note these port address are in HEX 


Data Pins          Status Pins            Control Pins

Pin 9: D7            Pin 10: S6               Pin 1  : C0

Pin 8: D6            Pin 11: S7               Pin 14: C1   

Pin 7: D5            Pin 12: S5               Pin 16: C2   

Pin 6: D4            Pin 13: S4               Pin 17: C3   

Pin 5: D3            Pin 15: S3                  

Pin 4: D2                                

Pin 3: D1                                

Pin 2: D0                                

 


Tutorial #1

 

Note that this was done in VB 2005 Express Edition.

The 1st Tutorial: Writing to the 'data' port and reading what we wrote on it.

The 2nd Tutorial: Reading from the 'status' port externally.  

 

Step 1: Basically; once you download the inpout32.dll file. Copy it to your system directory.  .ie C:\WINDOWS\system32
 
Step 2: Then in VB; Open a New File
 
Sample screenshot 

 

 

Step 3: In the text box, write a name for this project.  I called my 'Port_Testing'
 
Sample screenshot 
 
 
Step 4: "Drag" a button to your form window and then "Double Click" on the button.
 
Sample screenshot

 

 

Step 5: Once your in the code editor declare this at follows at the beginning of your code:
<FONT color=#0000ff size=2><P>Option</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>Strict</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>Off</P><P>Option</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>Explicit</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>On</P><P>Module</FONT><FONT size=2> InpOut32_Declarations</P><P></FONT><FONT color=#008000 size=2>'Inp and Out declarations for port I/O using inpout32.dll.</P></FONT><FONT size=2><P></FONT><FONT color=#0000ff size=2>Public</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>Declare</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>Function</FONT><FONT size=2> Inp </FONT><FONT color=#0000ff size=2>Lib</FONT><FONT size=2> </FONT><FONT color=#800000 size=2>"inpout32.dll"</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>Alias</FONT><FONT size=2> </FONT><FONT color=#800000 size=2>"Inp32"</FONT><FONT size=2> (</FONT><FONT color=#0000ff size=2>ByVal</FONT><FONT size=2> PortAddress </FONT><FONT color=#0000ff size=2>As</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>Short</FONT><FONT size=2>) </FONT><FONT color=#0000ff size=2>As</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>Short</P></FONT><FONT size=2><P></FONT><FONT color=#0000ff size=2>Public</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>Declare</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>Sub</FONT><FONT size=2> Out </FONT><FONT color=#0000ff size=2>Lib</FONT><FONT size=2> </FONT><FONT color=#800000 size=2>"inpout32.dll"</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>Alias</FONT><FONT size=2> </FONT><FONT color=#800000 size=2>"Out32"</FONT><FONT size=2> (</FONT><FONT color=#0000ff size=2>ByVal</FONT><FONT size=2> PortAddress </FONT><FONT color=#0000ff size=2>As</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>Short</FONT><FONT size=2>, </FONT><FONT color=#0000ff size=2>ByVal</FONT><FONT size=2> Value </FONT><FONT color=#0000ff size=2>As</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>Short</FONT><FONT size=2>)</P></FONT><FONT color=#0000ff size=2><P>End</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>Module</P></FONT></FONT></FONT>

Sample screenshot

 
Step 5: Scroll down to the 'event handler,' of Button1. 

 

<FONT color=#0000ff size=2><P>Public</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>Class</FONT><FONT size=2> Form1</P><P></FONT><FONT color=#0000ff size=2>Private</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>Sub</FONT><FONT size=2> Button1_Click(</FONT><FONT color=#0000ff size=2>ByVal</FONT><FONT size=2> sender </FONT><FONT color=#0000ff size=2>As</FONT><FONT size=2> System.Object, </FONT><FONT color=#0000ff size=2>ByVal</FONT><FONT size=2> e </FONT><FONT color=#0000ff size=2>As</FONT><FONT size=2> System.EventArgs) </FONT><FONT color=#0000ff size=2>Handles</FONT><FONT size=2> Button1.Click</P><P></P><P></FONT><FONT color=#0000ff size=2></FONT> </P><P><FONT color=#0000ff size=2>End</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>Sub</P><P>End</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>Class</FONT></P>
Step 6: Now within the event handler code, write the next following 3 lines of code: 
<FONT size=2><P>Out(&H378S, &HFFS)           </FONT><FONT color=#008000 size=2>'Print '1' to D7-D0 or 255 in Decimal</P></FONT><FONT size=2><P></FONT><FONT color=#0000ff size=2>Dim</FONT><FONT size=2> Value1 </FONT><FONT color=#0000ff size=2>As</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>String</FONT><FONT size=2>           </FONT><FONT color=#008000 size=2>'String named Value1</P></FONT><FONT size=2><P>Value1 = Inp(&H378S)         </FONT><FONT color=#008000 size=2>'Now Value1 has the values in 'data port'</P></FONT><FONT size=2><P>MessageBox.Show(Value1)   </FONT><FONT color=#008000 size=2>'A popup will indicate the current value written</P></FONT>

Sample screenshot 

Step 7: Run It!!! Using 'F5 Key' or going to 'Debug/Start Debugging.'

 

Sample screenshot

 

Here is the result of our hard earn work! 255 should appear on the messagebox.  If not, you screwed up.  Go back and repeat.  To see different results you can also modify the code by writing in any other number in hex within the 'Out(&H378S, [HEX CODE: Only from &H0S to &HFFS ]).' *Note that the range is 0 (zero)  to FF hex & not O.

 

Sample screenshot

 

 

 

Tutorial #2

 

 

Step 1: If you haven't gone through Tutorial #1 and your a novice.  I suggest that you should scroll up.
 
Step 2: Go to the 'Design Tab' and drag another button to the form window.
 

Sample screenshot 

Step 3: Next, double click on it and then add the following code in the 'eventhandler' for Button2.

 

<FONT size=2><P></FONT><FONT color=#0000ff size=2>Dim</FONT><FONT size=2> Value2 </FONT><FONT color=#0000ff size=2>As</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>String</FONT><FONT size=2>          </FONT><FONT color=#008000 size=2>'String named Value2</P></FONT><FONT size=2><P>Value2 = Inp(&H379S)        </FONT><FONT color=#008000 size=2>'Now Value2 has the values in 'signal port'</P></FONT><FONT size=2><P>MessageBox.Show(Value2)  </FONT><FONT color=#008000 size=2>'A popup will indicate the current value written</P></FONT>

 

Sample screenshot

 

Step 4: Run It!!! Press F5 or go to Debug/Start Debugging.

 

Step 5: Click on Button2 and watch for the popup window.  It should read 120 Decimal.

 

Sample screenshot

 


 

Explaination

 

What are Hex, Bin, Dec?

They are representations of numbers at differnt bases.

 

Hex = Hexidecimal Numbers (Base 16)

Bin = Binary Numbers (Base 2)

Dec = Decimal Numbers (Base 10)

 

We are most familar with base 10 since we count in decimal however computers are only familary with base 2; .ie 1's and 0's or 'on' and 'off.'  I'm not going to elaborate more than this.  To change between bases, simply use Microsoft Calculator that is already built in.  Just remember to change it from the 'Standard View' to the 'Scientific View.'  Write in the numbers and then simply click on what base you would like to see the number represent in.

Using the Status Port?

 

In Tutorial #1; we saw the MessageBox popup window showing a value of 255.  You might ask yourself, why is that.  First of all, DUH! We wrote 255 Decimal or FF Hex to it and ofcourse we can write anything else (0 - FF).

 

In Tutorial #2; we saw the MessageBox popup window showing a value of 120.  Again you might as yourself, why is that.  The answer is not as obvious.  You might think the value should be '0' since we wrote nothing to it & we didn't connect anything to our parallel port yet.  The answer is that Bit 7 (S7) of the signal port is inverted! (Ahhhhh) and S7 - S3 are always high enable.  (Yes!)

 

S7' = 1' = 0

S6 = 1

S5 = 1              

S4 = 1

S3 = 1

S2 = 0

S1 = 0

S0 = 0 

01111000bin = 120dec 

So you might ask yourself, how do we use the status port!!!

 

Just tie any of your status pins (any red pin) to ground (any green pins) and you should see a value change when you run my program again.

Sample screenshot

You see, on the status line; the pins are 'high' .ie 5V.  To enble them for reading purpose you'll have to ground your status pins. (OOOOOHHH!!!)

 

Examples:

 

Example 1: Nothing Connected to Status Pins

Sample screenshot

 

The result should be: 120

S7

S6

S5

S4

S3

S2

S1

S0

0

1

1

1

1

0

0

0

 

Example 2: Status Port (S7), pin 11 is grounded

Sample screenshot

 

The result should be: 248

S7

S6

S5

S4

S3

S2

S1

S0

1

1

1

1

1

0

0

0

Example 3: Status Port (S5), pin 12, is grounded

Sample screenshot

 

 

The result should be: 88

S7

S6

S5

S4

S3

S2

S1

S0

0

1

0

1

1

0

0

0

 

 

 

Comments & Sourcecode

 

There you go!  I know this was very long, but I hoped it helps.  If you need the code, I’ll be happy to share.  It’s in VB Express although. 

 

Download sourcecode

 

Email me at phebejtsov@yahoo.com for questions.

 

 

Regards

 

 

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

phebejtsov
United States United States
Member
No Biography provided

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
QuestionStatus Pin ProblemmemberAYYANZ1113 Jan '13 - 23:25 
Hi
 
Actually i want to connect a sensor to the status pin but my status pin already show high value i.e I get status value as 127 instead of 120 as shown in your article plss help me out...
Questionexception in input and output commandsmembermomina sheikh1 Oct '12 - 8:22 
when i click on the button1 an 'System.Runtime.InteropServices.SEHException'
exception comes and the same exception comes if i press button2..What should i do?
GeneralWorking or not depending on PCmemberlukeer12 Jul '12 - 20:16 
Hi phebejtsov,
 
thank you for sharing this article. It helped me a lot building an application that reads the parallel port's status.
 
The application works on my developer PC. I'm primarily interested in 1 digital input and chose BUSY for that. A relais (switch side, not coil side) connects BUSY to GND. With inactive relais, as well as without anything plugged in the port, my application reads 0x78 from the port. Activation of the relais changes that to 0xF8.
 
However, it doesn't work on the target PC. Instead of returning 0x78 from an untouched parallel port, it returns 0x79. Activating the relais doesn't change anything. No exceptions, error messages or anything point me somewhere.
 
On the target machine, I don't have administrative rights. Does that hinder from using inpout.dll?
 
I'm using inpout32.dll, version 1.0.0.1, 32768 Bytes.
 
Have you heard of such a problem before? Do you know of a solution?

Ciao,
 

luker

GeneralRe: Working or not depending on PCmemberlukeer16 Jul '12 - 21:53 
I was granted administrative access on the target PC. And indeed, the application works now.
 
Any insights on how to get this to work as a non-priviliged user?

Ciao,
 

luker

Questionreading from pmemberJembatan24 Jan '12 - 2:11 
Dear everybody,
 
I have made in vb6 a program using the inpout.dll for controling my modeltrain via the parallel port.
Now I have the situation that the parallelport is missing on my laptop.
Before I buy a usb to parallel convertor cable I like to know if the software is still working or in case not what to do to make it working again ?
 
thanks for your attention
 
Rob
GeneralMy vote of 5memberbiondi_roma9 Nov '11 - 19:33 
very usefull, tks
QuestionProblem with resultmemberkamrul102 Oct '11 - 3:14 
Hello,
 
I run this project in my computer with VB.net 2005 . when click to button1
 
with this event
 
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
 
            Out(&H378S, &HFFS)         'Print '1' to D7-D0 or 255 in Decimal
            Dim Value1 As String      'String named Value1
            Value1 = Inp(&H378S)      'Now Value1 has the values in 'data port'
            MessageBox.Show(Value1) 'A popup will indicate the current value written
 
      End Sub
 

I found 120 result , but not found 255 in decimal . could you please say me about this problem.
 
Thanks and Regards
Md Kamrul Islam
AnswerRe: Problem with resultmemberlukeer12 Jul '12 - 20:04 
Search the article for the headline "Using the Status Port?". It explains why you see a 120.

Ciao,
 

luker

QuestionParallel Port Problem Need Urgent HelpmemberSaddam Khan20 Sep '11 - 17:33 
Hello Sir,
I am really inspired by ur project and i appreciate ur efforts,
 
My Question in Detail:
I made two modules in VB regarding Inp and Out done programing, then i send the output to parallel port and i use inp function to get that value from sended port address, it seems my signals are reaching at the port. but i am still not confirming while they are reaching there or not, please inform me any simulator that detects signals in parallel port,
Secondly whenever i try to boot up my PC all Pins are on High, Even when i place One LED leg at controle Pin and One at Ground Still my LED Lights Up (Which should not be done)
 
Please show me a way that my LED only Lights Up on Certain Pins whom i give instructions from my Program otherwise these pins should be Off( not high as always).
 
I think there is nothing wrong from programing side but the problem is with hardware that is always active and lights up LED everytime before my instructions and also my if i send &H0 it also doesnot work and doesnot disable the datapins.
 
please help me urgently...
QuestionPort AddressmemberPinkPurple3 Sep '11 - 5:41 
Hi,
 
Your tutorial is very helpful and it seems to be working except that I cannot change the output value (tutuorial 1).  I think this is because I don't have the correct port address.  No matter which Hex value I enter the messagebox always displays 255.  
 
I'm using a USB to Parallel port on Windows 7 (32 -bit) and I'm running the code in VB 2010.  Can you tell me how to determine the address when using a USB Parallel port?
 
Thanks
GeneralHow to set parallel port in VB6 programming?membersaathis26 Apr '11 - 23:53 
Hi bro....
 
Here im saathis final year student implementing speech door access system in vb6....
 
How to make sound to text then text to parallel port data high & low...
If user say his password that fixed in database. It will check then D1 of
port goes to high and rotate the motor to open the door... same process for close
operation... how to build it in VB6... please help me
 
info: microsoft access 2007 for database platform... Use USB to parallel 25 pin since
my laptop don't have parallel port... Please help me bro... it urgent :(
GeneralHow to set parallel port in VB programming?membersaathis26 Apr '11 - 23:53 
Hi bro....
 
Here im saathis final year student implementing speech door access system in vb6....
 
How to make sound to text then text to parallel port data high & low...
If user say his password that fixed in database. It will check then D1 of
port goes to high and rotate the motor to open the door... same process for close
operation... how to build it in VB6... please help me
 
info: microsoft access 2007 for database platform... Use USB to parallel 25 pin since
my laptop don't have parallel port... Please help me bro... it urgent :(
GeneralThanks!memberC1sc03 Sep '10 - 13:56 
Very nice tutorial Big Grin | :-D
GeneralMy vote of 3membergotohellda4 Jul '10 - 23:11 
its good demonstration, helped me lot
GeneralThanxmemberKhalido8r27 Apr '10 - 21:22 
Very nice tutorial .. ... Smile | :)
***ISLAM POWER***

NewsParallel Port Digital Oszilloscope and Logic AnalyzermvpElmue24 Apr '10 - 3:49 
Hello
 
If you came to this article from Google because you are looking for a way to measure digital signals via parallel port then have a look at the following article:
17 Channel Logic Analyzer!
 
* Digital Oscilloscope / Logic Analyzer with up to 17 input lines
* Uses the parallel (printer) port for input.
* While Logic Analyzers normally are very expensive, this one is for zero cost
* Written in speed optimized C++ to get the maximum possible sample rates
* The program is a stand alone single EXE file which neither needs any additional DLLs nor any framework. It runs out of the box
* Runs on all Windows platforms (95, 98, ME, NT, 2000, XP, 2003, Vista, 2008, Windows 7, 2008 R2)
* Runs on 32 Bit Windows and 64 Bit Windows
* When first run, installs a driver to access hardware IO ports on all NT platforms
* Plays a sound via PC speaker to prove that the driver works correctly
* Shows the actual state of the input lines life in the LED's of the GUI
* Captures up to 500.000 samples / second (depending on your hardware and OS)
* Captures to memory (rather than disk) for maximum speed
* Capturing runs always with the maximum frequency that the hardware allows
* Memory saving capture technology stores only the changes of the input lines rather than storing all lines with each sample that is taken
* The capture process is independent of data analyzing so you can try various settings to display the captured data in the best way
* The analyzer generates coloured oscilloscope diagrams with a raster grid
* The output is written into an HTML file and one or multiple GIF files
* So the analyzer results can easily be shared with other people who must not install any program to view a proprietary binary format
* You can write an individual heading into each analyzer output to distinguish them later in a multitude of files
* When analyzing data, you can choose to delete old analyzer output or keep the old files
* The time axis shows absolute or relative time with microsecond precision (Performance Counter)
* Automatic detection of inactive input lines shows only the channels that have activity
* Automatic detection of idle time cuts out long phases of inactivity
* Automatic detection of input frequency chooses the adequate raster unit like on a real oscilloscope (10 µs, 20 µs, 25 µs, 50 µs, 100 µs, etc..)
* Automatic detection of context switches of the operating system
* Decoding of serial protocols like I2C Bus, PS/2 Bus, SMBus, ModBus, SPI Bus, Asynchronous (RS232, RS422, RS485), Infrared Remote Controls, Smartcards is partially already implemented or may be added by you.
* Decoded serial data (Start Bit, Parity, Acknowledge, Stop Bit) and the Byte that they represent is written into the diagram
* Very cleanly written source code with a proper error handling and plenty of comments
 
Elmü
QuestionReading port status change eventmembersairfan113 Dec '09 - 3:58 
Hi,
 
Its good article you teach how to read port status other than sending data to port, my question is, is there some method to rise an event when ever status of statur port is changed.
 
Regards
GeneralIt is working in vb 2008 alsomemberHarshadwasu15 Nov '09 - 7:49 
Hi
Thanks a lot for this
GeneralRe: It is working in vb 2008 alsomembermomina sheikh1 Oct '12 - 8:26 
<pre lang="sql">when i click on the button1 an &#39;System.Runtime.InteropServices.SEHException&#39;
exception comes and the same exception comes if i press button2..What should i do?</pre>
Generalhi this code really worksmemberfred0702 Oct '09 - 16:08 
thanks phebejtsov, it really helps!
GeneralRe: hi this code really worksmembermomina sheikh1 Oct '12 - 8:35 
when i click on the button1 an 'System.Runtime.InteropServices.SEHException'
exception comes and the same exception comes if i press button2..What should i do?
QuestionCan not work normallymemberRick Pan21 Apr '09 - 5:27 
I got ur code and test, but i got the exception:
System.Runtime.InteropServices.SEHException: External component has thrown an exception.
I tried to put INPOUT32.DLL to application folder and system32 folder, it can not normally both.
I dont why, pls help me, thanx.
AnswerRe: Can not work normallymemberfred0702 Oct '09 - 16:09 
put it in the bin\debug folder
GeneralRe: Can not work normallymembermomina sheikh2 Oct '12 - 2:26 
you mean bin is folder and debug is a folder inside it and where is bin located...
Actually when i run the code the SHE exception comes on pressing the buttons...what should i do.
GeneralPIC based projectmembermaelan09141 Jan '09 - 3:38 
how can i connect PIC16F877 to parallel port.?
 
i'll w8 ur rply...
GeneralS0, S1 and S2memberjavier_nicolasYahoo7 Dec '08 - 8:04 
Hello,
 
excelent tutorial
 
I have a question for you
 
Can I use safely for reading purpose, the pins named S0, S1 and S2 ?
 
And in this case, we would not need to ground those pins. Am I right ?
 
in order to activate those pins
 
Can I inject safely 5v or 12v into those pins? for example, from an external Pc's power supply
 

regards!
 
javier from Cordoba (Argentina)
Generalinout32.dll not workingmemberbobbyaryan1604 Dec '08 - 20:01 
have inout32.dll but still not working
Generalcontling micrcontrollermemberbobbyaryan16023 Nov '08 - 19:30 
how can i control microcontroller in vb.net perllel ports ..
plz reply
Generalwe screwed up - general hangmembermackel0111 Sep '08 - 13:28 
as we have tried to follow the tutorial and killed many hours on this nice peace - it did NOT work and we have been running around the net and been looking for the "Right"
inpout32.dll - but no success at all - we run windows XP
and have posted the inpout32.dll in various places including the system32 and the project catalog but no success. The saying is SEhException was unhandled and it stops on
inp (&H379S)
GeneralRe: we screwed up - general hangmemberAimica10 Sep '10 - 7:56 
Hi,
I have seen the same problem as yours, but after I get the new inpout32.dll, and save it into c:\windows\system32\drivers or c:\windows\system32\
it is working now
 
WriteOh!!
Generaladd button switchmemberQurex16 Jun '08 - 0:20 
how can i add button switch on circuit so the user can click the button on circuit then our program catch the input..
 

thanks
 
noname

Generalit's not working :Smembermalalation29 Feb '08 - 17:21 
hello, I tried the steps in this article step by step on my VB2005 (not the express edition), I got no errors but when I click on the button there is a run time error and a VB message is shown "External component has thrown an exception." and the message is titled "SEHExeption was unhandled".
I'm using a PC with windows XP with SP2, can it be the problem?
GeneralRe: it's not working :SmemberPetey14 May '08 - 6:15 
Me too.
This worked for me:
I replaced old version C:\WINDOWS\system32\inpout32.dll
with new version from http://www.logix4u.net/
QuestionCan i receive data with event?memberamir1928 Oct '07 - 7:26 
How i can use an event when status pins changed and response to my robot speed?
AnswerRe: Can i receive data with event?memberPablo Romano2 May '09 - 18:11 
I wrote a post about that, hope it helps.
 
http://moebiusit.com/blog/pabloromano/2009/04/03/building-onchange-event-to-listen-the-parallel-port/[^]
QuestionStill have inpout3.dll?memberAriston Darmayuda27 Jul '07 - 18:14 
The logix4u site is down, do you still have the inpout32.dll, please share me into this email: darmayuda.b.ariston@gmail.com, I really need the DLL for my project.
 
Thanks.
AnswerRe: Still have inpout3.dll?membercitizen_runner23 Nov '07 - 6:26 
I also need the inpout32.dll. My email is citizen_runner@yahoo.com.
 
Thanks
AnswerRe: Still have inpout3.dll?membergsuspradeep19 Dec '09 - 17:04 
I too need that...pls send as soon as possible to this mail
 
gsuspradeep@gmail.com
Questionparallel port inputmemberdannydy29 May '07 - 21:53 
hi I'm new here,recently i'm doing my project on parallel port,using the parallel port to control my motor,i used vb 6.0, i've read the inpout32.dll,for write to the port, the portaddress was 888, whereas read from the port,portaddress was 889.
 
well!!! the output of the pin are working fine.now i stunt on the input of the parallel port. how do i get feedback from the input of the parallel port while it's on high(1).because i'm using sensor the track the movement of the motor.could anyone tell me what's the solution.thanks
AnswerRe: parallel port inputmemberrigidigi3 Jul '07 - 1:40 
im a beginner. , there are four pins of the 5 status pins of status port i was thinking of using. So I was thinking of only reading the result of those for 4 bit info from which to get motion info from. Only one pin is on hight is it not ?
 
I am wanting to get the exact position. Could you share your ideas on motion sensing please?
GeneralRe: parallel port inputmemberdannydy3 Jul '07 - 7:20 
well basically there are 5pins of status port.4pins are on high,when they aren't grounded.which is pin 10,12,13,15.whereas pin 11 is Low.pin 11 is high when Smile | :) it was grounded.so it also can be use as one reading info.
sorry for one thing i need to know before i answer your question,what thing u apply on this status pins.
GeneralRe: parallel port input [modified]memberrigidigi4 Jul '07 - 21:58 
I have been using a couple of 1.5 batteries to get a 3 volt source. I connect that between a ground pin and whichever status pin. What was high becomes low, low becomes high, whilst ever the battery is connected to a particular pin.
 
This all seems to work fine, unless all the data pins D0 - D7 are on high. Then this stops working , I dont know why just yet.
 

 

-- modified at 4:17 Thursday 5th July, 2007
 
also my status port seems back to front from the example, the value returned
from status port with no connections on parallel port anywhere is 135, the exact opposite . 10000111
GeneralRe: parallel port inputmemberdannydy4 Jul '07 - 22:56 
first check your coding,data port D0-D07 wont be affected by status port and control port.data port address was 888,and status port was 889.this is what i declared on my project.
default value of the status port was 127, which is 1111111. why you want to connect the 3v on the status pin?isnt it's supply source to other component,or else. if it is, you can use one of the data pins, data pins provide 5v, add one 1K resistor. Smile | :)
 
if you want to get exact position, there is one easy way for doing that,apply a limit switch on that position, connect it with on of the status pin, when the limit switch is turn on, then get the value to do next step.
 
value=inp(889)
if value = 63 then 'assumed i'm used pin 10,(binary=0111111)'
.....
end if
 
hope can help you.;)
 

GeneralRe: parallel port input [modified]memberrigidigi5 Jul '07 - 2:23 
ECP parallel Port. C# VS2005, win XP ,asus k8v-x se, Inpout32.dll , io.dll
Hi Experts, this may weary you but I getting nowhere. I am trying to get reliable input to the status port using external power supply. Always works great while DATA Port is low(00000000) If Data Port Low and nothing connected then Status Port Reads 135(10000111) , the status port reverts back to 135(10000111) as soon as I take away the signal voltage I have on pin/s. This seems perfect! BUT.....
If DATA Port is high(11111111) then Status Port reads 127(01111111) and I cannot use /affect status port again untill I have reset the Data Port (00000000)? This is the worst extreme of the situation. In between values on the DATA Port simply make the Status Port 'haphazard/unreliable' not sure of the pattern yet.
Im operating machinery of a sort with the Data Port and trying to get them to feed back to the Status Port what is going on Smile | :)
 

 

-- modified at 17:51 Monday 9th July, 2007
AnswerRe: parallel port inputmemberswindya20 Jul '07 - 21:43 
I had messed around with my notebook's LPT1 for sometime. A week ago when I developed a program that read the port, everything was fine and sweet. My LPT1 worked well. I assigned &H378 to 0, which seems to make the data port as input port, and the program read the port smoothly. But when I applied the prog (in VB 6) and install/copy some dll (incl inpout32.dll to my PC, it didn't worked. I'm still curious why it did not work in my PC. I checked all the bios setting on both but it seems that they are similar (all in ECP mode).
 
dOni
 
"Imagination is more important than knowledge" - A.Einstein

GeneralRe: parallel port inputmemberdannydy22 Jul '07 - 1:28 
regarding your problem, have u copy the dll to right position>?(C:\WINDOWS\system32).
if u do, then u ca try to unistall ur parallel port on device manager.and then reinstall back.and u're assigned the port address to &H378, for input port of the parallel port should use &H379, or use 889.
hope can assist u and solve your problem.
Smile | :)
GeneralParallel port input datamemberAaron MY28 Apr '07 - 22:30 
Hi,
 
Thanks for the great article.
I would like to know about data input
 
1. Anyway to get the value of the input pin whenever the input port value is changed? without pressing the button?
 
2. Can we get the value from the status and control input port concurrently?
 
Thanks and regards
Aaron
GeneralRe: Parallel port input datamemberrigidigi3 Jul '07 - 1:44 
I guess to use the timer control, and within the timers event just put the two methods to read the input.
GeneralRe: Parallel port input datamemberMREM14 Mar '08 - 4:55 
sorry
i donot know
tell me if you reach to the answer
MREM
Generalneed helpmemberWaqas Habib19 Apr '07 - 20:07 
sir i want to control my PC with remote control. i have a remote control, whose receiver is connected to computer through printer port. how can i rceive the signal of remote on computer.
 

 
Waqas

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Permalink | Advertise | Privacy | Mobile
Web03 | 2.6.130516.1 | Last Updated 8 Aug 2006
Article Copyright 2006 by phebejtsov
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid