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

I/O Ports Uncensored - 1 - Controlling LEDs (Light Emiting Diodes) with Parallel Port

By , 27 Sep 2003
 
Prize winner in Competition "C# Aug 2003"

Sample Image - article1_001.jpg

Introduction

This article is on reaching ports, controlling external devices and electronics. Perhaps you are asking "why?" The idea is simple: It is to achieve something that is real, physical and emotional. As a freelancer I have been coding for about 4 years for my own interest. At first I started with C but now for the GUI, I use mostly C# . Therefore a lot of people participating in the codeproject can declare and assign a variable in more than one language:

C:
PHP:
VB: //I don't know VB so I looked at MSDN
int variable = 5; $variable = 5; Dim variable As Integer = 5

We can do things, however we do same things using different methods. By working in different ways we improve our skills, but everyday something new comes and we need to look for the references. For eg: there are differences in .NET Framework 1.0 and 1.1, MSDN says "we have improved" blah blah blah... Who cares?!... As a result, you need to make some changes in your old program and this is a pain...

Anyway, a friend of mine said: "You have to pass your electronic knowledge with everybody..." This is why I am writing this article.

PART 1 - Some basics of a parallel port

What is a port?

A port contains a set of signal lines that the CPU sends or receives data with other components. We use ports to communicate via modem, printer, keyboard, mouse etc. In signaling, open signals are "1" and close signals are "0" so it is like binary system [See Part 3]. A parallel port sends 8 bits and receives 5 bits at a time. The serial port RS-232 sends only 1 bit at a time but it is multidirectional so it can send 1 bit and receive 1 bit at a time...

Parallel Port - Data Ports:

In my application, I used the data ports which can be seen in the picture from D0 to D7

Parallel Port - Status Ports:

These ports are made for reading signals. The range is like in data ports which are S0-S7. But S0, S1, S2 are invisible in the connector (See my picture in the article). I mentioned these are for reading signals but S0 is different, this bit is for timeout flag in EPP (Enhanced Parallel Port) compatible ports. The address of this status port is 0x379 . this will always be refer to "DATA+1" and it can send 5 numeric data from the 10 - 11 - 12 - 13 - 15 th pins. So how can we reach the data ports? It is simple: every parallel port has an address. In Windows 2000, you can see yours by Settings > Control Panel > System > Hardware > Device Manager > Ports (COM & LPT) > Printer Port(LPT1) > Properties = in Resources > Resource Setting and you can see your address for your parallel port. For Ex: Mine is 0378-037F. This is hexadecimal like in math (mod 16). 0x378 belongs to 888 in decimal form. In this way you can look for your com port or game port addresses. Let's enlighten these bits with a printer example:

  • S0: This bit becomes higher (1) if a timeout operation occurs in EPP mode.
  • S1: Not used (Maybe for decoration :))
  • S2: Mostly not used but sometime this bit shows the cut condition (PIRQ) of the port
  • S3: If the printer determines an error it becomes lower (0). Which is called nError or nFault
  • S4: It is high (1) when the data inputs are active. Which is called Select
  • S5: It is high(1) when there is no paper in printer. Which is called PaperEnd, PaperEmpty or PError
  • S6: It sends low impact signaling when the printer gets a one byte data. Which is called nAck or nAcknowledge
  • S7: This is the only reversed pin on the connector (see my table in the article) . If the printer is busy and it cannot get any additional data this pin becomes lower. Which is called Busy

Parallel Port - Control Ports:

This port usually used for outputting but these can be used for inputting. The range is like in data ports C0-C7 but C4, C5, C6, C7 are invisible in connector. And the address for this is 0x37A

  • C0: This pin is reversed. It sends a command to read D0-D7 on the port. When the computer starts it is high in the connector. Which is called nStrobe
  • C1: This pin is reversed. It sends a command to the printer to feed the next line. It is high in the connector after the machine starts. Which is called Auto LF
  • C2: This pin is for reset the printer and clear the buffer. Which is called nInit, nInitialize
  • C3: This pin is reversed. Sends a high(1) for opening data inputs. It is low after the machine starts. Which is called nSelectIn
  • C4: Opens the cut operation for the printer. Not visible in the connector...
  • C5: Sets the direction control in multidirectional ports. Not visible in the connector...
  • C6: Not used and also Not visible in the connector...
  • C7: Mostly not used but it is used as a C5 in some ports. Not visible in the connector...

Parallel Port -Ground Pins:

These are (G0 - G7) the pins from 18 to 25 . These are mostly used for completing the circuit.

After these I used data ports in my application because there are reversed pins in control and status ports. Here is an explanation for reversed pins: While you are not sending any signals to the data port it is in closed position like "00000000" so the 8 pins have no voltage on it (0 Volt) .If you send decimal "255" (binary "11111111") every pin (D0-D7) has a +5 Volt... On the other hand, if I used control ports, there are reversed pins which are C0, C1 and C3 so while we send nothing to the control port its behaviour is "0100" in binary (decimal "11")... If I receive e-mails from you I can make apps using control and status ports...

Signal BIT PIN Direction
-Strobe

¬C0

1 Output
+Data Bit 0 D0

2 Output
+Data Bit 1 D1

3 Output
+Data Bit 2 D2

4 Output
+Data Bit 3 D3

5 Output
+Data Bit 4 D4

6 Output
+Data Bit 5 D5

7 Output
+Data Bit 6 D6

8 Output
+Data Bit 7 D7

9 Output
-Acknowledge

S6

10 Input
+Busy

¬S7

11 Input
+Paper End

S5 12 Input
+Select In

S4 13 Input
-Auto Feed

¬C1 14 Output
-Error

S3

15 Input
-Initialize

C2

16 Output
-Select

¬C3

17 Output
Ground

-

18-25

Ground

PART 2 - Electricity - Lets get some Zzzzzttt zzzzttt...

I made an electrical circuit to show you how our circuit work. It is shown in the picture...

And also I get different angled pictures of my complete circuit. Click for the bigger ones.

Click to enlarge Click to enlarge

Ok then let's find out what we have to supply:

  • 1 or 2 meter parallel port cable (3 mt is acceptable but the voltage drops from 5 V to 4.7 V)
  • 9 assembling cables (8 go to resistance and 1 go to ground)
  • A Breadboard (white one in the picture) or you can solder the cables but with a breadboard you don't have to...
  • 8 Leds (2,5 V)
  • 8 Resistances (470 ohm) (For not to make the leds garbage because of +5V)
  • A Multimeter (Not needed but if something happens you can check the wiring with this...)
  • My Program to make your circuit live :)

Assemble the circuit as in the picture if it is not clear, e-mail me as ls@izdir.com and I will send you the bigger pictures of the circuits...

Part 3 - Hexadecimal / Decimal / Binary

People who have knowledge about the subject can easily pass this part...

Binary = 0, 1 --> 2 digit

Decimal = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 --> 10 digit

Hexadecimal = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F --> 16 digit

Ex 1: We have a six digit binary number like "100111" and we want to make it decimal so what we have to do?
Ex 2: We have a two digit decimal number like "11" and we want to convert it to binary???
Ex 3: We have a three digit hexadecimal number like "21F" and we want it to convert to decimal???

The logic is in these three examples but nobody does the conversion like this. They use Windows operating system's scientific calculator. So if a conversion is needed I use Start > Programs > Accessories > Calculator . or you can make your own conversion program. Also you can check my loop (enumerated checkboxes) func in my app for binary to decimal conversion.

Part 4 - Before coding

Before coding I want to give some info about reaching the ports by using a language and OS. When I was using Windows 98 I could reach the ports with a function which is "outportb". When I upgraded to Windows 2000 this failed because of its kernel. You can not reach the ports directly in NT, 2000 and XP because of their kernel and their printer drivers. Let me prove this: First make the circuit as in the pic and then shutdown your computer, start it, if you have multi boot menu select Windows 98, when it starts there is no light up in the circuit but in Win2000 and XP all the 8 lights are on so we know that the signal is coming and the pins are registered by their kernel with the printerdriver.

Part 5 - Lets make the code to do the rest

I used inpout32.dll in my app for interoping. You can check the workflow below for inpout32.dll and also you can get the source of the dll from here .

Note: I am importing it with the reference of http://www.logix4u.net/ So for further info about the driver check out the site...

In my PortInterop.cs I used the following:

using System;
using System.Runtime.InteropServices;

public class PortAccess
{
    [DllImport("inpout32.dll", EntryPoint="Out32")]
    public static extern void Output(int adress, int value);
}
So you have to import inpout32.dll to your debug or release directory. By the way, the main thing in my Form1.cs is PortAccess.Output. It takes two variables which are address and value. If your data ports are set in "0x378" (see Part 1) you will have to write "888" because "378" Hexadecimal is equal to "888" in decimal. (Default LPT1 is set to "378") If you are using LPT2 which is "0x278" you have to write for the address "632" For ex: for full signaling to pins we have to call the Output method of PortAccess like:
PortAccess.Output(888, 255); 

And for null data we have to send "0" to the Output method like:

PortAccess.Output(888, 0); 

I wrote a func for reseting the LEDs which is:

private void Reset_LEDs()
{
    PortAccess.Output(adress, 0);
}

I didn't use loops for checkboxes and pictureboxes you can also enumerate these for quick coding. First, I do like that but after I changed to several if-else statements because I had to change the GUI. But I left them on the code for performance issues anyone who want speed can use these.

You can also reach your ports with Turbo C++ like:

#include <conio.h>
#include <dos.h> // For _out
#define port 0x378 // Port Address
#define data port+0 // Data Port of the parallel cable
void main (void)
{
  _out(data, 255); // For all lights on
  _out(data, 0); // For all lights off
}

Last Part - Conclusion

I think you will find this to be the most exciting part of this article... So what can you do besides powering small LEDs? You can... Search the net about relays for triggering higher voltages, search some electrical newsgroups and then make circuits and connect them to your parallel port, light up your room lights or turn on your TV etc etc... You can do a thousand things it is up to your imagination... I am planning to write more articles about relays, lcds, oscillators and things like that (of course with PC connection)... Below is a picture of my next article...

Final Note

English is not my first language, so please excuse any mistakes. This is my first article for codeproject, so any suggestions and/or feedback will be appreciated. Thanks for reading till here.

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

Levent Saltuklaroglu
Web Developer
Turkey Turkey
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   
SuggestionMorememberMaged E William27-May-13 3:09 
Wow i cant believe this is was from 10 years thats great, is there more tutorial on this kind of controlling,
can you make it wireless,
i have some C# & electronic packground but i have no idea how to make things like you do any adivce to start
Questiontoggle switch changing port statusmemberkanisious22-Feb-13 22:08 
Is there a way of doing the opposite, i am looking at a simple counter (toogle switch) , every on off records as one on the computer by just polling through a port.
Questioncan you make it OCXmemberMohamed Badr Saad29-Sep-12 1:12 
Thanks very much for that code .
can you make it ocx to use it in oracle ?
 
Thanks and Best Regards
Mohamed Badr
GeneralGreatememberAJMAL SHAHZAD12-Sep-12 21:39 
Great article.Thumbs Up | :thumbsup:
GeneralMy vote of 5membergwyder5-Sep-12 3:31 
Great article
GeneralMy vote of 5memberNuwat Wh12-Jul-12 20:57 
Good job.
Questionthanksmemberuniqueprogrammer10-May-12 9:35 
thanks dear for the code
QuestionThanks and inpout32memberredox884-May-12 0:42 
It was really helpful for me your programe and i was struggling with inpout32.dll as many of you.How ever i was really foolish that i got two windows directories in my c: and 2nd one was the correct directory(It was due to XP installation fault).Then i put dll in windows/system32 and worked like a charm.
For the people who are seeking help with the circuit fault i suggest lalim parallel port controlor to check whether your circuit correct or not.
Thanks once again for helping people like us.It's amazing how internet helping people even this artical 10+ years old.
Questiondid anyone compile it to 64bit?memberTamas Redler17-Apr-12 7:48 
i'm having troubles compiling this to 64bit..did any of you managed to finish it up? thanks in advance!
Question36 pins ?memberMazen el Senih30-Mar-12 6:17 
Hi Levent would you please explain how to make this works with 36 parallel pins ?! Blush | :O
I'll be appreciated , thank you .!
 
got my 5 ! and thanks for the great article and explanation.
There is always hope ..!

AnswerRe: 36 pins ?memberTamas Redler17-Apr-12 8:24 
this link might help you http://www.lammertbies.nl/comm/cable/parallel.html[^]
 
regards
GeneralRe: 36 pins [modified]memberMazen el Senih18-Apr-12 1:54 
Thank you very much Tamas ,that's exactly what I was looking for Big Grin | :-D
I appreciate it and thank you again.
 
Regards..
There is always hope ..!


modified 18-Apr-12 8:04am.

Questionparallel port led controlingmemberMember 86228517-Feb-12 9:35 
hellow I am trying to control led's form parallel port using c# 2008 express edition and the program run successfully but when i click check box the error appear saying this (SEHException was unhandeled) and also say this (External component has thrown an exception) what is error and how to remove it
please help me thank you!
AnswerRe: parallel port led controlingmemberhari51625-Mar-12 19:59 
The inpout32.dll was corrupted one i guess...best option is google for another inpour32.dll and add to ur project.So that u wont get the exception Because i had faced the same exception while interfacing a parallel port.
Questionusb to parallel convertermemberMember 858543728-Jan-12 1:32 
Can you please tell how to use the same method by using usb to parallel converter in windows 7... I am struggling a lot on it...!!!
QuestionWhat changes to be done if we use Windows 7 operating system?? will the LED's glow??memberPranav Kasture21-Jan-12 20:43 
What changes to be done if we use Windows 7 operating system?? will the LED's glow??
GeneralMy vote of 5memberOshtri Deka18-Jan-12 10:43 
I was planning to do similar thing, but I am too lazy. Smile | :)
When I look back this is simpler and much better approach.
QuestionCan you post the assembly version of the code?memberF6oom13-Jan-12 1:35 
Hi,
Thanks for your amazing article. I was wondering if you it's possible to post the assembly language version of the code?
GeneralMy vote of 5memberMember 815764022-Nov-11 2:19 
good ,
good help
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...P
QuestionDemo application does not change the voltages in the pins d0-d7memberAbdul Saleem22-Aug-11 18:18 
I could successfully launch the exe, but the data pins are not responding to the checkbox actions on the demo window. I am using XP Professional 2002 SP3. By default the data pins (d0-d7 with ground pin) are showing 4.5 to 5 volt. This voltage does not change as per the selection/deselection of checkboxes. I even tried after copying the inpout32.dll in system32 folder. Looks like the ports are out of control. Please help me.
 
I checked the voltages using multimeter when LEDs didnt work. Port used was LPT1 378
AnswerRe: Demo application does not change the voltages in the pins d0-d7memberSaddam Khan20-Sep-11 23:04 
same problem with me...
u must be having this problem also that when u boot up ur pc there is already voltage availabale in Parallel prot which should not be.
AnswerRe: RE Demo application does not change the voltages in the pins d0-d7memberSaddam Khan20-Sep-11 23:05 
same problem with me...
u must be having this problem also that when u boot up ur pc there is already voltage availabale in Parallel prot which should not be.
GeneralMy vote of 5memberChristian Fils5-Jul-11 3:06 
It say everything as i want!!
QuestionI/O Ports Uncensored - 1 - Controlling LEDs (Light Emiting Diodes) with Parallel PortmemberCOERIC27-Jun-11 16:53 
HElP HOW TO DOWNLOAD IT
 
http://www.codeproject.com/KB/cs/csppleds/LED_Source.zip
http://www.codeproject.com/KB/cs/csppleds/LED_Demo.zip
 
IT SAY
 
GFI WebMonitor

You have been blocked from downloading this file since it breaches a security policy.
 
More Information:
Breached Policy: Default Download Control Policy
Blocked IP/user: 192.168.1.105
Payload type: Zip
GeneralRelay card not interfacing the relays thru the parallet portmemberWilliam_Arias6-Apr-11 13:03 
Hi,
I have made an 8-relay card to interface it with the parallel port of my IBM Thinkpad T30 or any other T##. I have used the InpOut32.DLL library for the interface with a Visual basic program.
 
After I completed the project, tested on regular desktop PC and it works great. However, when I tried it on my IBM T30, the relays on the PCB do not respond.
 
If try it again on my desktop PC it works.
 
Why doesn't my relay card work on my laptop or any laptop?
 
Thank you very much!
 
William Arias Wink | ;)
GeneralRe: Relay card not interfacing the relays thru the parallet portmemberHerries E13-Apr-11 15:13 
Hi William,
 
I think the voltage from laptop is too low to activate the relay.
Maybe you can try to amplifying the signal from Parallel port.
Your PCB has any power supply or regulator (E.g. 7805 / 7812) !?
 
Regards,
 
Herries E
AnswerRe: Relay card not interfacing the relays thru the parallet portmemberibyk3014-Jun-11 3:45 
is your LPT port enabled and configured the same way?
is it same address? (you can check in Device Manager.)
do you get any error? did you check voltage levels
("0" and "1") on LPT when your relay board is connected?
GeneralMy vote of 5memberTapas Mondal8620-Dec-10 6:19 
This is truly helpful,and also thanks to the author for sharing this.I hope to see his next article.
QuestionHow can LEDs control with USB adapter’s parallel port?memberft0mi16-Nov-10 8:08 
I would like to implement this project. I only have a laptop computer with USB connection to Printer Adapter and the project doesn't work well.
 
I think it maybe because the USB adapter's Parallel LPT port does not have IO address, and it can't remap to 278, 378, or 3BC legacy ISA address either.
So I can't use inpout32.dll.
 
How is it possible to solve this to use USB adapter's parallel port to this project?
For example if it could be solved with another .dll or other solutions are welcomed.
 
Thank you very much for your help.
AnswerRe: How can LEDs control with USB adapter’s parallel port?memberSepp Obermayer9-Jan-11 2:40 
Sorry, my english is realy bad.
 
This project works only with a real lpt.
Usb-converter didn't suport this.
 
The best way to solve this problem is to use an microcontroller like an AVR (ATmega, ATmega88, ATmega32,...) and send the data with an usb converter which simulates an RS232 at the OS.
 
There could be used different sorts of converter:
FT232 (USB-UART converter)
USB-RS232 Converter and +12/-12V to +5V/05V converter
Or an V-USB: http://www.obdev.at/products/vusb/index.html[^] / http://www.obdev.at/products/vusb/projects.html[^]
QuestionExternal portmemberkburman62-Oct-10 6:26 
I have tried it with external port(USB to parallel port) but it does not work.I think it has different port address. Is it that or some thing else.
QuestionWirelessmemberMyn9227-Aug-10 23:48 
Hi
 
Any idee how could I do the same thing without using ani cables between my circuit and my PC? I was thinking at a bluetooth communication.
 
Thanks
GeneralMy vote of 5memberJGDger11-Aug-10 1:55 
Very helpful article! Thanks
Questionhow about SERIAL/COM port?memberrayvandy23-Apr-10 17:57 
hi all, im new in c# programming. may i know if this one also works for serial/COM ports? and since i dont have serial/parallel port in my laptop, is it possible to have USB to parallel/serial port converter? thxs b4
AnswerRe: how about SERIAL/COM port?memberwim ton4-May-10 1:03 
With the serial port you can use the control lines like RTS, CTS, DTR, DTS, CD and RI without any special DLLs to circumvent the OS's hardware protection.
 
see EscapeCommFunction(fd,CLRDTR);
 
Unfortunately you have less signals available as with a parallel port.
 
Cheers, Wim
GeneralFor those of you who have problems with Vista\7membershynet28-Mar-10 9:37 
First check that you used the right dll for the right system (inpoutx64.dll for 64bit os and inpout32.dll for 32bit os) and followed the instructions correctly. if you are still not able to control the LEDs go to Device Manager, open up the "Ports (Com & LPT)" tree and uninstall Printer Port (LPT1) by right clicking on it and selecting "Uninstall" now restart your system. Worked for me!
GeneralRe: For those of you who have problems with Vista\7membergumigyuri6-May-10 21:35 
I used the inpoutx64.dll , modified the code like this:
 
public class PortAccess
{
[DllImport("inpoutx64.dll", EntryPoint="Out32")]
public static extern void Output(int adress, int value);
}

, uninstalled the LPT1 driver , but it doesn't work , i get this error at: PortAccess.Output(adress, value); :
Exception System.BadImageFormatException was thrown in debuggee:
An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)

 
Can someone please help me with some example to make this work on Windows 7 x64 ? Blush | :O
GeneralRe: For those of you who have problems with Vista\7membershynet7-May-10 0:29 
It seems you are not compiling the code to x64 (If I'm right).
I think you should also use the normal 32 bit inpout.dll file.
GeneralRe: For those of you who have problems with Vista\7membergumigyuri7-May-10 1:39 
I'm using SharpDevelop 2.0 to compile and it "forces" me to sellect 32-bit processor when compiling ... is there a workaround to compile it to x64 ?
 
btw. if i use the original inpout32.dll and run the compiled application it doesn't give me an error but the LEDs don't light up, under Windows XP(32bit) the application works.
GeneralRe: For those of you who have problems with Vista\7memberdineshvijay13-Mar-11 4:09 
for me too.. i cant determine the parallel port's address...
NewsParallel Port Interface Kit Available !!!memberHerries E2-Mar-10 21:01 
Dear all,
 
I've developed the Parallel Port interface kit many years ago.
The kit come with 12-5V Voltage Regulator, 2x 7 Segment Display, 8x LED for display, 2x button for input usage, 8x output socket to interface with others devices / automation & PCB with some ICs to control the input / output signals.
 
Good for lab / testing / hobbies & automation project.
 
Stock are still available.
 
Anyone interested pls contact me at herries_e@yahoo.com
 
Regards,
 
Herries E
GeneralParallel Port - External component has thrown an exceptionmemberpfaisalbe12325-Jan-10 7:50 
Hi
 
I am thinking to use parallel port to control an electronic circuit.
 
I need to open the port and close the port based on requirement.
 
I have used the following code
 
Public Declare Function Input Lib "inpout32.dll" Alias "Inp32" (ByVal PortAddress As Integer) As Integer
 
Public Declare Sub Output Lib "inpout32.dll" Alias "Out32" (ByVal PortAddress As Integer, ByVal Value As Integer)
 
Output(888, 255)
 
I am getting an error message as
External component has thrown an exception
 
Parallel port setting are 0378-037F
 
I used 0378
 

 
Please suggest
 
Thanks
 
Faisal
GeneralRe: Parallel Port - External component has thrown an exceptionmemberHusam_vc2-May-10 12:31 
You have to put the inpout32.dll in the debug ...
Good luck
QuestionLED s glow even when the Port is disabledmemberjaskamal singh15-Jan-10 21:29 
Sir
i am a computer engineer using your project as a ingredient for mine.I have a standard PC wid an lpt port .i was testing the port wid my multimeter...i gt the followin stats.
 
Disabled Enabled
 
Current 2.3ma 139 ma
 
Voltage 5.09v 5.09 V
 
Now the problem is ,wen i used an led ,it never went off .even when the port was disabled it glowed faintly.There is a brightness difference though .So wat resistance shd i use to nullyfy this garbage value.im currently using 470 ohms as u said ,bt its filtring properly.
 
please help.
Questionhow to solvemembernabin1212-Nov-09 3:20 
while programming parallel port
after running the program it throw the message
"external component has thrown an exception"
please send me answer as soon as possible
my address is : nabin_304@yahoo.com
GeneralWorks on a Toshiba laptop + PCMCIA Parallel card with Windows XPmemberJacques Pelletier8-Oct-09 19:19 
I have a Toshiba Satellite with a PCMCIA Parallel port card from Startech (CB1PECP).
The card is located at address 64920 instead of 888 (FD98 instead of 378).
I had tweaked the code a little bit to make it work; just changed 888 for 64920 and voilà!Thumbs Up | :thumbsup:
GeneralRe: Works on a Toshiba laptop + PCMCIA Parallel card with Windows XPmemberfirill3-Mar-10 9:31 
what did you change in the program so that it works in your laptop. because i have a problem to output the data i need from the pcmcia express card on my laptop.
GeneralSEHException when calling Output Input methodsmemberlonik.r21-Jul-09 0:57 
Hi,
I´m using M$ Visual Studio 2005 and Windows XP SP2.
I downloaded dll inpout32.dll to Windows/System32 and to BIN/Debug directory of my project.
When I´m trying to call Input or Output method, program always invoke SEHException. I know
that SEHException is invoked from unmanaged code, when there is no mapping to .NET exception.
 
I have searched all over the web, how to fix this, but with no success. Does anybody know,
how to fix this problem?
 
Roman Lonik
lonik.r@centrum.cz
Czech Republic
GeneralPROBLEM -URGENTmemberantew10-Jun-09 23:31 
Hello
i was doing a project which interacts with the parallel port so i downloaded this source code but when i run it throws the exception below
 
"Unable to load DLL 'inpout32.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)"
 
i didnt install any setup. do i need something to be installed before accessing the parallel port?
i'm using wnndows 2000 professional sp2
 
please plz plz help its urgent --your help means alot!
 
thanks!

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.130617.1 | Last Updated 28 Sep 2003
Article Copyright 2003 by Levent Saltuklaroglu
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid